From patchwork Sun Aug 28 13:18:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42026 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 90FDB27BBEB; Sun, 28 Aug 2022 14:20:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 35FC027BBE9 for ; Sun, 28 Aug 2022 14:20:41 +0100 (BST) Received: from localhost ([::1]:44394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDQ-0003Ls-Bk for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICq-0002m1-Ll for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICq-0002e9-Cz for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICq-0006xs-8G for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 04/20] import: sourceforge: Issue error-message if version is given. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57460 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57460@debbugs.gnu.org Received: via spool by 57460-submit@debbugs.gnu.org id=B57460.166169275026493 (code B ref 57460); Sun, 28 Aug 2022 13:20:04 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:10 +0000 Received: from localhost ([127.0.0.1]:57769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBx-0006t8-KQ for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:09 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:46625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBr-0006rp-Vz for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:04 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MVvCn-1otPpX1VKP-00RqGj for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:18:58 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 903E265A30; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:30 +0200 Message-Id: <1a9944cefa8d235753b3d099e88b68c854813e8b.1661691694.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:oDDQU7mVnAwaLBnA1VWCsWWBbhaXuqSIH86aQWdMq+2qo/74XSN 3AaU99cvV4xPtxvezNsu6WCTGVEfxual/GyiobscJ9d1rVKItkw119rQag2dOl7lLGRIRF3 gFGzI3JlzIMrnOGpTOa0lU0WYKUZQJewDanV4EGpgEb9n9tIMgcbhmGWhg+mauLLrTrDajA sUe3VkorwLTLo9dlWjnag== X-UI-Out-Filterresults: notjunk:1;V03:K0:DtRji45W2q8=:qV/5TLyTR0d4qE5JBYHQds 3+dfFJ8RTKdUye7lyR+uLX4Dhy5F5+CFQOGkKSva2SfyMoOQwa5eCSkUIQa5ZQhnfqm82pa+Z SmoStXjm8WBa4SknTqY130lTEbJH1DhoufYQgx1HkSFXzr5bfz/pild/8jwoV50O32Y2C4ggp X99hYutpey/73rwCYNz7cWtwhTjwIAU0ClSp06fmWIEGtaZms83JcGd4szJmJ9jQygcK3upG7 88S6U7y0IGtBVBuQOZ5fvr+FfXGWX7apU6Kat9KI0P9+odq0oJ/NcAFzN6/NJc1JTkekpoUd6 vSEs3AdiYyonnKpMZA/Z8sqQD/E9PyKP8OIiDKdRILQpRzcQPeD3LKah1tEv3LY8pGC8l5HPn eZw2iTYAcnvbHA6QvBXLmCO2u7XYW9Rxn5OKSsynFOghcpF9hHtqfojXyb19c0ZdigWfnJ5bZ QePeB9zu3vVS0n3nE9ORFVgduWWhGTOPpea6jizRnHLjJrgBvAzDYq5OH3qPs/nT2Xxrj/OxK ZNCYV6KcJbNbAuWYcE1s/FCny6WoS4HV+4cqdo277BH1FttnVrW3yKcWEn87epDZLtqGclnav 7E0Xddx+PY84t8uVqRsEP7gDpTVq8vScom4N6N/M/7qu1SSKQJ5C8DdkcJZ6KuhhzK615KAGv XeQIQ+j76HlHbA0+boSUarC10WWydFDcc9fK1dD3bv1MKmKX8zWgYbjSTWlGU+9LzpplRHrKT MSjF5n7wk2oi2ho6/55cjIsmem5A5uT1/kM6NcIk5BsKkHeE2xrb2NuDk6g= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Due to the complicated directory structure at sourceforce, enabling the sourceforge importer to update to a specific version is very complicated to implement. Since only 2.0% of the packages in guix are covered by this updater I dedided to now implement this. * guix/gnu-maintenance.scm(latest-sourceforge-release): Issue error-message if version is given. --- guix/gnu-maintenance.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index a278903a8d..8446a59fb5 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -34,6 +34,8 @@ #:use-module ((guix http-client) #:hide (open-socket-for-uri)) #:use-module (guix ftp-client) #:use-module (guix utils) + #:use-module (guix diagnostics) + #:use-module (guix i18n) #:use-module (guix memoization) #:use-module (guix records) #:use-module (guix upstream) @@ -683,7 +685,7 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." #:directory directory) (cut adjusted-upstream-source <> rewrite)))) -(define (latest-sourceforge-release package) +(define* (latest-sourceforge-release package #:key (version #f)) "Return the latest release of PACKAGE." (define (uri-append uri extension) ;; Return URI with EXTENSION appended. @@ -698,6 +700,12 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." ((200 302) #t) (else #f)))) + (when version + (error + (formatted-message + (G_ "Updating to a specific version is not yet implemented for ~a, sorry.") + "sourceforge"))) + (let* ((name (package-upstream-name package)) (base (string-append "https://sourceforge.net/projects/" name "/files"))