From patchwork Sun Aug 28 13:18:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42021 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 F253E27BBE9; Sun, 28 Aug 2022 14:19:12 +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 19C0C27BBEA for ; Sun, 28 Aug 2022 14:19:11 +0100 (BST) Received: from localhost ([::1]:48096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIBy-0002EM-9e for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:19:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSIBq-0002Dz-Lr for guix-patches@gnu.org; Sun, 28 Aug 2022 09:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSIBq-0002P2-B0 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSIBq-0006sD-3y for guix-patches@gnu.org; Sun, 28 Aug 2022 09:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 01/20] upstream-updater: Rename record field. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:19:02 +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.166169273926406 (code B ref 57460); Sun, 28 Aug 2022 13:19:02 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:18:59 +0000 Received: from localhost ([127.0.0.1]:57757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBm-0006ro-9I for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:18:59 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:49671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBj-0006rY-TE for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:18:57 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N49Qd-1pReCO2o0f-0102LK for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:18:49 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 5F25D5F52C; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:27 +0200 Message-Id: <27f47be66e4656d8b97c3c6169dd04897fc68dbc.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:wPmPDc//q6U1fqpME3cjEQcJ5iflA4Jvad8G0DmsWFCG674pOFq F0NrBXRZmSFZ/3x2v7GDwpx42TsJf9tZmpy/da/kPMup8OiUvxDbTWAoxvpum2xG0DlWTMS /+sZ7NnDk7uyRzNIMUOyfo/Eev18G4vyxFZOeiNrEZcxslzVmDFNXW+EAFMOwNWPGY83qeG ej/PIZR+Fn7GhQbE10gPQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Uvxk75a3Uys=:z/JZ+jIyON60Foo7Z6uvRo BB034rJnqHZsUDnckUEim90UOlIkVd4LuEp82UjEyCU9BezPwHB987Q/cpVG6o5jADhZT1CUz ckWcPg1BNf+C6A55zQXQPS0+QQBN+IvKeD0M/CWnFtn7yjUX7bbxYkznzyH5FWG4uLEC09Cxj ieIHFcb8cbj3OHxNQ4ww3ilkxfzlCpZXJ9uR6TqPoOaA20FW6roakleM5Ru39uMQNyc+ORs1l 9RVkakBHpdLdUEmXR+jdTqJAhwMy07zq4nwWhrqRcYjpOgTPGciY6lpi5vW+lsoi50vWA3QRZ uSgcJHx6SB1QhGseKVCQ52T2FniEXcDW1UV1bHL2/r1DzJFuews7cjZ05PBqXbL8vh3iaAO3h kwz4sYh4uI1krBI3OYTZ0SLfqYnAae5Ogg+vhhVTBKjP6e13bwCH1bsQVuZtZ4eCi+gTKAp8B zVuSp0pYl4UJw/BEiH5rOwHFljLHQY4ITcTSOTTGGqlgCMHQoeUJz/S7LaPZKfK4gdDY/doTz g3PRXPz79zwEOyVo5RW90I76sgFhoAoJUCG5V6c8ZAsWfyLjBkIEz6OQ52JKa81xKGZlN0//K /h/fM0MUPN2/WCZUG9JwD4PKbOMFlQ3HG3m2UFjRCMgr6XLfRebdKMscLQDsOFYZN9+dOhnnx Fscxi3znS7hF2f4N2zgfhdvLvLoEpOMus/f536zQ/FCtdMPYQedw9di4HKNh4GkoQrumyTvml IytFhKnbGEB7VpwbPvzGmHQoRrDYssxYV/6neuI/ySTC71UIU4tkaTxofrE= 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 The next commits will make the functions, which are currently importing the latest version of a package, change into importing the latest or a given version of the package (for those updaters supporting specifying a version). Thus the name ‘latest‘ is no longer appropriate. * guix/upstream.scm(upstream-updater) Rename field [latest] to [import]. (lookup-updater, package-latest-release) Adjust fieldname accordingly. * guix/gnu-maintenance.scm(%gnu-updater, %gnu-ftp-updater, %savannah-updater, %sourceforge-updater, %xorg-updater, %kernel.org-updater, %generic-html-updater), guix/import/cpan.scm(%cpan-updater), guix/import/cran.scm(%cran-updater, %bioconductor-updater), guix/import/crate.scm(%crate-updater), guix/import/egg.scm(%egg-updater), guix/import/elpa.scm(%elpa-updater), guix/import/gem.scm(%gem-updater), guix/import/git.scm(%generic-git-updater), guix/import/github.scm(%github-updater), guix/import/gnome.scm(%gnome-updater), guix/import/hackage.scm(%hackage-updater), guix/import/hexpm.scm(%hexpm-updater), guix/import/kde.scm(%kde-updater), guix/import/launchpad.scm(%launchpad-updater), guix/import/minetest.scm(%minetest-updater), guix/import/opam.scm(%opam-updater), guix/import/pypi.scm(%pypi-updater), guix/import/stackage.scm(%stackage-updater), tests/import-github.scm(found-sexp) tests/transformations.scm("options->transformation, with-latest"): Adjust fieldname accordingly. --- guix/gnu-maintenance.scm | 14 +++++++------- guix/import/cpan.scm | 2 +- guix/import/cran.scm | 4 ++-- guix/import/crate.scm | 2 +- guix/import/egg.scm | 2 +- guix/import/elpa.scm | 2 +- guix/import/gem.scm | 2 +- guix/import/git.scm | 2 +- guix/import/github.scm | 2 +- guix/import/gnome.scm | 2 +- guix/import/hackage.scm | 2 +- guix/import/hexpm.scm | 2 +- guix/import/kde.scm | 2 +- guix/import/launchpad.scm | 2 +- guix/import/minetest.scm | 2 +- guix/import/opam.scm | 2 +- guix/import/pypi.scm | 2 +- guix/import/stackage.scm | 2 +- guix/upstream.scm | 10 +++++----- tests/import-github.scm | 2 +- tests/transformations.scm | 8 ++++---- 21 files changed, 35 insertions(+), 35 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index e7edbf6656..a278903a8d 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -830,7 +830,7 @@ the directory containing its source tarball." (name 'gnu) (description "Updater for GNU packages") (pred gnu-hosted?) - (latest latest-gnu-release))) + (import latest-gnu-release))) (define %gnu-ftp-updater ;; This is for GNU packages taken from alternate locations, such as @@ -841,41 +841,41 @@ the directory containing its source tarball." (pred (lambda (package) (and (not (gnu-hosted? package)) (pure-gnu-package? package)))) - (latest latest-release*))) + (import latest-release*))) (define %savannah-updater (upstream-updater (name 'savannah) (description "Updater for packages hosted on savannah.gnu.org") (pred (url-prefix-predicate "mirror://savannah/")) - (latest latest-savannah-release))) + (import latest-savannah-release))) (define %sourceforge-updater (upstream-updater (name 'sourceforge) (description "Updater for packages hosted on sourceforge.net") (pred (url-prefix-predicate "mirror://sourceforge/")) - (latest latest-sourceforge-release))) + (import latest-sourceforge-release))) (define %xorg-updater (upstream-updater (name 'xorg) (description "Updater for X.org packages") (pred (url-prefix-predicate "mirror://xorg/")) - (latest latest-xorg-release))) + (import latest-xorg-release))) (define %kernel.org-updater (upstream-updater (name 'kernel.org) (description "Updater for packages hosted on kernel.org") (pred (url-prefix-predicate "mirror://kernel.org/")) - (latest latest-kernel.org-release))) + (import latest-kernel.org-release))) (define %generic-html-updater (upstream-updater (name 'generic-html) (description "Updater that crawls HTML pages.") (pred html-updatable-package?) - (latest latest-html-updatable-release))) + (import latest-html-updatable-release))) ;;; gnu-maintenance.scm ends here diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index 87abe9c2f1..cb2d3dd410 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -358,4 +358,4 @@ in RELEASE, a record." (name 'cpan) (description "Updater for CPAN packages") (pred cpan-package?) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 4e1ce7c010..33305d68eb 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -723,13 +723,13 @@ s-expression corresponding to that package, or #f on failure." (name 'cran) (description "Updater for CRAN packages") (pred cran-package?) - (latest latest-cran-release))) + (import latest-cran-release))) (define %bioconductor-updater (upstream-updater (name 'bioconductor) (description "Updater for Bioconductor packages") (pred bioconductor-package?) - (latest latest-bioconductor-release))) + (import latest-bioconductor-release))) ;;; cran.scm ends here diff --git a/guix/import/crate.scm b/guix/import/crate.scm index c76d7e9c1a..51bfcd7bed 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -370,5 +370,5 @@ look up the development dependencs for the given crate." (name 'crate) (description "Updater for crates.io packages") (pred crate-package?) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/egg.scm b/guix/import/egg.scm index 52196583c4..aa689f8d84 100644 --- a/guix/import/egg.scm +++ b/guix/import/egg.scm @@ -348,6 +348,6 @@ not work." (name 'egg) (description "Updater for CHICKEN egg packages") (pred egg-package?) - (latest latest-release))) + (import latest-release))) ;;; egg.scm ends here diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 9399f45ebc..1dbdff9391 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -444,7 +444,7 @@ type ''." (name 'elpa) (description "Updater for ELPA packages") (pred package-from-elpa-repository?) - (latest latest-release))) + (import latest-release))) (define elpa-guix-name (cut guix-name "emacs-" <>)) diff --git a/guix/import/gem.scm b/guix/import/gem.scm index 0e5bb7e635..81ea4e8f9c 100644 --- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -183,7 +183,7 @@ package on RubyGems." (name 'gem) (description "Updater for RubyGem packages") (pred gem-package?) - (latest latest-release))) + (import latest-release))) (define* (gem-recursive-import package-name #:optional version) (recursive-import package-name diff --git a/guix/import/git.scm b/guix/import/git.scm index 4cf404677c..bb5ba4d97e 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm @@ -226,4 +226,4 @@ tag, or #false and #false if the latest version could not be determined." (name 'generic-git) (description "Updater for packages hosted on Git repositories") (pred git-package?) - (latest latest-git-release))) + (import latest-git-release))) diff --git a/guix/import/github.scm b/guix/import/github.scm index e1a1af7133..ac6ef06eda 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -330,6 +330,6 @@ releases." (name 'github) (description "Updater for GitHub packages") (pred github-package?) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm index 43966c1028..3562e17e0f 100644 --- a/guix/import/gnome.scm +++ b/guix/import/gnome.scm @@ -114,4 +114,4 @@ not be determined." (name 'gnome) (description "Updater for GNOME packages") (pred (url-prefix-predicate "mirror://gnome/")) - (latest latest-gnome-release))) + (import latest-gnome-release))) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 878a7d2f9c..d56f52a221 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -381,6 +381,6 @@ respectively." (name 'hackage) (description "Updater for Hackage packages") (pred hackage-package?) - (latest latest-release))) + (import latest-release))) ;;; cabal.scm ends here diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 2a7a9f3d82..3b63837393 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -344,4 +344,4 @@ latest version of PACKAGE-NAME." (name 'hexpm) (description "Updater for hex.pm packages") (pred (url-prefix-predicate hexpm-package-url)) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/kde.scm b/guix/import/kde.scm index 6873418d62..510d823a4f 100644 --- a/guix/import/kde.scm +++ b/guix/import/kde.scm @@ -187,4 +187,4 @@ not be determined." (name 'kde) (description "Updater for KDE packages") (pred (url-prefix-predicate "mirror://kde/")) - (latest latest-kde-release))) + (import latest-kde-release))) diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm index aeb447b0a5..b7e0295c4e 100644 --- a/guix/import/launchpad.scm +++ b/guix/import/launchpad.scm @@ -145,4 +145,4 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (name 'launchpad) (description "Updater for Launchpad packages") (pred launchpad-package?) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/minetest.scm b/guix/import/minetest.scm index 43cfb533e2..6581013215 100644 --- a/guix/import/minetest.scm +++ b/guix/import/minetest.scm @@ -513,4 +513,4 @@ or #false if the latest release couldn't be determined." (name 'minetest) (description "Updater for Minetest packages on ContentDB") (pred minetest-package?) - (latest latest-minetest-release))) + (import latest-minetest-release))) diff --git a/guix/import/opam.scm b/guix/import/opam.scm index b4b5a6eaad..8a5aa4d8c6 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -435,4 +435,4 @@ package in OPAM." (name 'opam) (description "Updater for OPAM packages") (pred opam-package?) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 4760fc3dae..3e3e949283 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -583,4 +583,4 @@ source. To build it from source, refer to the upstream repository at (name 'pypi) (description "Updater for PyPI packages") (pred pypi-package?) - (latest latest-release))) + (import latest-release))) diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index 49be982a7f..af9809304f 100644 --- a/guix/import/stackage.scm +++ b/guix/import/stackage.scm @@ -175,6 +175,6 @@ PACKAGE or #f if the package is not included in the Stackage LTS release." (name 'stackage) (description "Updater for Stackage LTS packages") (pred stackage-lts-package?) - (latest latest-lts-release))) + (import latest-lts-release))) ;;; stackage.scm ends here diff --git a/guix/upstream.scm b/guix/upstream.scm index cbfd1aa609..6cee6440c3 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -66,7 +66,7 @@ upstream-updater-name upstream-updater-description upstream-updater-predicate - upstream-updater-latest + upstream-updater-import upstream-input-change? upstream-input-change-name @@ -240,7 +240,7 @@ correspond to the same version." (name upstream-updater-name) (description upstream-updater-description) (pred upstream-updater-predicate) - (latest upstream-updater-latest)) + (import upstream-updater-import)) (define (importer-modules) "Return the list of importer modules." @@ -271,7 +271,7 @@ correspond to the same version." "Return an updater among UPDATERS that matches PACKAGE, or #f if none of them matches." (find (match-lambda - (($ name description pred latest) + (($ name description pred import) (pred package))) updaters)) @@ -284,9 +284,9 @@ them until one of them returns an upstream source. It is the caller's responsibility to ensure that the returned source is newer than the current one." (any (match-lambda - (($ name description pred latest) + (($ name description pred import) (and (pred package) - (latest package)))) + (import package)))) updaters)) (define* (package-latest-release* package diff --git a/tests/import-github.scm b/tests/import-github.scm index 4d3f8cfc7e..5100296540 100644 --- a/tests/import-github.scm +++ b/tests/import-github.scm @@ -92,7 +92,7 @@ (define* (found-sexp old-version old-commit tags releases) (and=> (call-with-releases (lambda () - ((upstream-updater-latest %github-updater) + ((upstream-updater-import %github-updater) (example-package old-version old-commit))) tags releases) upstream-source->sexp)) diff --git a/tests/transformations.scm b/tests/transformations.scm index dbfe523518..ce29b1676c 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm @@ -470,10 +470,10 @@ (name 'dummy) (pred (const #t)) (description "") - (latest (const (upstream-source - (package "foo") - (version "42.0") - (urls '("http://example.org"))))))))) + (import (const (upstream-source + (package "foo") + (version "42.0") + (urls '("http://example.org"))))))))) (let* ((p (dummy-package "foo" (version "1.0"))) (t (options->transformation `((with-latest . "foo"))))) From patchwork Sun Aug 28 13:18:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42022 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 1887227BBEA; Sun, 28 Aug 2022 14:20:29 +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 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 CADDB27BBE9 for ; Sun, 28 Aug 2022 14:20:28 +0100 (BST) Received: from localhost ([::1]:59248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDE-0002m5-0K for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICp-0002lj-Gp for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICp-0002VJ-8S for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICo-0006xb-Rf for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 02/20] import: cpan: Remove unused exports. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:02 +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.166169274326452 (code B ref 57460); Sun, 28 Aug 2022 13:20:02 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:03 +0000 Received: from localhost ([127.0.0.1]:57762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBr-0006sa-70 for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:03 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:48907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBm-0006rd-W1 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:18:59 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N49Ul-1pReCT2ySv-0106pR for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:18:52 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 72B7F62E15; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:28 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:aDhNf/DFjShoduALdUHHo6+1z1FHzZ2VHEohFXd/Ncfa1QfSC+5 6hGzNctNTJv2Dswzuz7ZrNjbIPHjnXqDPrdyqDxY2iZEIZQN+3LC84pbmhRK55gV53z97bV 0W51GiLxwbQnySnm0wPoT3WkCd70WRmvFZ1yM7HFtDQ4nzJphA/YMMLMQrL8XHtapaPsRWZ 76TLzsX4oql27wY81XY+Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:DuK0xJiMtyI=:vxlmLg7AlkaYwvgoLWbqE/ 0ucL5QSoXzzfONwWpGlCjqNlFZE+0/tNXdXDp//4uJl3yeBMEbJ4WIKAqRpWyeyqd0v83xjq3 vda3FEEOr5J6K3SfKrOHw8fHAZM+go5kcAV/AfuL+zrtnJwazG1qMmYWm7jAbzyv/u6/rbbV7 4lJ1p7K0wNamtK7X4VoSMzgBUWv/WiMFyRlNt/DIkikzh/f1gh/m4IwYRv3XsycybOYEBRhfJ BDSMdF6Gou9ye1GUDPD26/xCWtTyQSTQEFdmdz1jJsJndIXYEHWbT9OA/IXVqKnY4bRV7kPIN iep3S3fSdIJo38JLME31cqfI7JI+agGmD4gcfEiIGKqFxNJjpsamppnxXFz1zYBTFGNfojAdM ssn9nj4/lHf3C7D9mM2aeiuyZSSYRe0KpymVIRYE643fgWyNfuARGjmG+vJVXSO7a6gpAStIZ zfUuNhhFwOapF1mXMZN6QIrh5ho2+7gVM6QZtCoEXqu94qNZm7jqm+qXDPGfkGM5FGgIKR5so c2lNxwG998w1SrsR14VD1IitKvOHTOhlg5ZYkhRufBaR9n/gkuglj0VKDahf+0RCoUJtuyiBf OSswH7ZrfKtJFmf031e1stVr8Eh2K3NgEH4eXrWBQmSFqcW9qtp9jdMI3/k1FrMWhfYjGNfx7 eFfjFCYfNp5Eu5fZEDEhkPFyYYKsbG6Me4076YHxK2I07Sv+nd/t6iUxyv6JSIQRhIB3hsDv1 bn8YIPsgycTHnGCTKdnoVp2Xq0sZKGmdTUOUzvpjezU+GwtQwAjTNeKqw9o= 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 * guix/import/cpan.scm(#:export): Remove unused exports. --- guix/import/cpan.scm | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index cb2d3dd410..a929dc62e3 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -39,26 +39,7 @@ #:use-module (guix packages) #:use-module (guix upstream) #:use-module (guix derivations) - #:export (cpan-dependency? - cpan-dependency-relationship - cpan-dependency-phase - cpan-dependency-module - cpan-dependency-version - - cpan-release? - cpan-release-license - cpan-release-author - cpan-release-version - cpan-release-module - cpan-release-distribution - cpan-release-download-url - cpan-release-abstract - cpan-release-home-page - cpan-release-dependencies - json->cpan-release - - cpan-fetch - cpan->guix-package + #:export (cpan->guix-package metacpan-url->mirror-url %cpan-updater From patchwork Sun Aug 28 13:18:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42023 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 BBF3427BBEB; Sun, 28 Aug 2022 14:20:33 +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 8CE4727BBE9 for ; Sun, 28 Aug 2022 14:20:32 +0100 (BST) Received: from localhost ([::1]:59250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDH-0002of-F2 for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICq-0002lr-2n for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICp-0002cw-QS for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICp-0006xl-L9 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 03/20] updaters: 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:03 +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.166169274926485 (code B ref 57460); Sun, 28 Aug 2022 13:20:03 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:09 +0000 Received: from localhost ([127.0.0.1]:57766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBw-0006t0-Fa for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:09 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:50431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBp-0006rg-AF for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:02 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N2E5Q-1pQGcT1XtW-013f06 for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:18:55 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 8547862E16; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:29 +0200 Message-Id: <41578ce3ed904afa3f6b6d1d6db159d70b26f605.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:7Buse58L+KjPwEGjSVZjyyPvVY7Dnm0AdqChBwaAX1tmTJLcrmg BW5+qpY3n6iyhB9E82aMzwaCRfhFGSLgTI5DNrnVSEeX88V8pna39f6goLUQHeyEO58tP9Y kO/PUuSYIaEQVgsiHF4GPhYlXWf5dpj3AZw0Ho7hCh7Vq+qAzOKbcfDGBuk9uG5x2X17t/g Q5FlGperxC7xrkZyfSvOg== X-UI-Out-Filterresults: notjunk:1;V03:K0:1Im6UrrRFF8=:/Z15Ug0dVsVN+SMeO/z1w8 X+brfCuIxsV2cNNvgceZ3wAbBJxB4uKd33Md6xw60G9y2bBop2gOMzSqchSXcVxzOitDwoK6C KuOfNVPV1K9T8H0udI4AHqwKz8CC0ZA88eeH3GD/DI9IVOB7iswi8QbLQR1W91pwkWr3m0tNi yHPcrgBJ6rdhlEKJEKXV3WwSj/lh3ZBob6+vVfUw27RgD47Z0BqVBZNnFE7dE4CstopuabYVJ I0A1tCyWh2ubDCuhljJ+pdsseiXCwH379pNjUBgT5QEwojdAvWf2VrTxpD71RCPMxyxKDsO9+ GBljaXJ8yolD+y7HDlOTpapcAnrEPl9AcNMnsp3PHnlwCCHDZYpuLIHvpQJfbcg7lkMllW3xl H9FlMNJ4Tne2M8PnT2Q4oKkRUyd1f5hfREU8n3muEgEJGHH3E8z8TI072ZC/xn6CxXMmxKrDv x6rWg5zWyNCgo6ylrXABIcsFkurzdlVz6Rky8/7ZFGoAMB6EbzSOrVZ4263KoVI8rCu8qWvRX TAEwpPaR7aMHFTkSf7J6kBzG2K9VuxsMIcfIAu1Y6M8aaRO9N4hwhd+ZrvH4jDqXDrwhPRLM/ l4XLlc2W+g3QYOhIiv+yKaNTUq/WlCVCwVNVTtU0QjiCvnv/g2oul//tMdSTARx9GIgxAfju/ DUqavfkUWj2Yd3Roc7FUz4KSVowEQCkzjILYaWBdhnH81eoAmOZE+aqJHjN7RPmDqZ+EM8Cpq 8cGhbk6/pExF25EGzhLkBI4OHNMRTV0WCfWDheP5G6p5XS1uC1t/Z3XgcMM= 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 These importer don't support importing a specific version, thus the updater does neither. Issue an error message in case version is given. * guix/import/cpan.scm(latest-release), guix/import/elpa.scm(latest-release), guix/import/gem.scm(latest-release), guix/import/hackage.scm(latest-release), guix/import/minetest.scm(latest-minetest-release), guix/import/opam.scm(latest-release): Add keyword argument 'version', issue error if version is given. * guix/import/cran.scm(latest-cran-release): Same. (latest-bioconductor-release) Same. : rename to . * guix/import/stackage.scm(latest-lts-release): For each generated updater, add keyword argument 'version' and issue error if version is given. --- guix/import/cpan.scm | 9 ++++++++- guix/import/cran.scm | 19 +++++++++++++++---- guix/import/elpa.scm | 9 ++++++++- guix/import/gem.scm | 10 +++++++++- guix/import/hackage.scm | 10 +++++++++- guix/import/minetest.scm | 10 +++++++++- guix/import/opam.scm | 9 ++++++++- guix/import/stackage.scm | 8 +++++++- 8 files changed, 73 insertions(+), 11 deletions(-) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index a929dc62e3..8972b87080 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Alex Sassmannshausen ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2020, 2021 Ludovic Courtès +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ #:use-module (srfi srfi-26) #:use-module (json) #:use-module (gcrypt hash) + #:use-module (guix diagnostics) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix base32) @@ -305,8 +307,13 @@ in RELEASE, a record." ")")))) (url-predicate (cut regexp-exec cpan-rx <>)))) -(define (latest-release package) +(define* (latest-release package #:key (version #f)) "Return an for the latest release of PACKAGE." + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "cpan"))) (match (cpan-fetch (package->upstream-name package)) (#f #f) (release diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 33305d68eb..eadced512f 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -640,8 +641,13 @@ s-expression corresponding to that package, or #f on failure." (_ #f))) (_ #f))))) -(define (latest-cran-release pkg) +(define* (latest-cran-release pkg #:key (version #f)) "Return an for the latest release of the package PKG." + (when version + (error + (formatted-message + (G_ "~a provides only the latest version of each package, sorry.") + "CRAN"))) (define upstream-name (package->upstream-name pkg)) @@ -660,20 +666,25 @@ s-expression corresponding to that package, or #f on failure." (changed-inputs pkg (description->package 'cran meta))))))) -(define (latest-bioconductor-release pkg) +(define* (latest-bioconductor-release pkg #:key (version #f)) "Return an for the latest release of the package PKG." + (when version + (error + (formatted-message + (G_ "~a provides only the latest version of each package, sorry.") + "bioconductor.org"))) (define upstream-name (package->upstream-name pkg)) - (define version + (define latest-version (latest-bioconductor-package-version upstream-name)) (and version ;; Bioconductor does not provide signatures. (upstream-source (package (package-name pkg)) - (version version) + (version latest-version) (urls (bioconductor-uri upstream-name version)) (input-changes (changed-inputs diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 1dbdff9391..f9e9f2de53 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,6 +36,7 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) + #:use-module (guix diagnostics) #:use-module ((guix download) #:select (download-to-store)) #:use-module (guix import utils) #:use-module (guix http-client) @@ -400,11 +402,16 @@ type ''." (string-drop (package-name package) 6) (package-name package)))) -(define (latest-release package) +(define* (latest-release package #:key (version #f)) "Return an for the latest release of PACKAGE." (define name (guix-package->elpa-name package)) (define repo (elpa-repository package)) + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "elpa"))) (match (elpa-package-info name repo) (#f ;; No info, perhaps because PACKAGE is not truly an ELPA package. diff --git a/guix/import/gem.scm b/guix/import/gem.scm index 81ea4e8f9c..590fec3dcd 100644 --- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2020, 2021 Ludovic Courtès ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,10 +26,12 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (json) + #:use-module (guix diagnostics) #:use-module ((guix download) #:prefix download:) #:use-module (guix import utils) #:use-module (guix import json) #:use-module (guix packages) + #:use-module (guix i18n) #:use-module (guix upstream) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix base16) @@ -167,8 +170,13 @@ package on RubyGems." (define gem-package? (url-prefix-predicate "https://rubygems.org/downloads/")) -(define (latest-release package) +(define* (latest-release package #:key (version #f)) "Return an for the latest release of PACKAGE." + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "gem"))) (let* ((gem-name (guix-package->gem-name package)) (gem (rubygems-fetch gem-name)) (version (gem-version gem)) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index d56f52a221..3c2cd75db4 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2019 Simon Tournier +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,10 +31,12 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-26) #:use-module (srfi srfi-1) + #:use-module (guix diagnostics) #:use-module ((guix download) #:select (download-to-store url-fetch)) #:use-module ((guix utils) #:select (package-name->name+version canonical-newline-port)) #:use-module (guix http-client) + #:use-module (guix i18n) #:use-module (guix import utils) #:use-module (guix import cabal) #:use-module (guix store) @@ -359,8 +362,13 @@ respectively." (let ((hackage-rx (make-regexp "(https?://hackage.haskell.org|mirror://hackage/)"))) (url-predicate (cut regexp-exec hackage-rx <>)))) -(define (latest-release package) +(define* (latest-release package #:key (version #f)) "Return an for the latest release of PACKAGE." + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "hackage"))) (let* ((hackage-name (guix-package->hackage-name package)) (cabal-meta (hackage-fetch hackage-name))) (match cabal-meta diff --git a/guix/import/minetest.scm b/guix/import/minetest.scm index 6581013215..1f1cfc834d 100644 --- a/guix/import/minetest.scm +++ b/guix/import/minetest.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2022 Maxime Devos +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module (srfi srfi-2) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (guix diagnostics) #:use-module ((guix packages) #:prefix package:) #:use-module (guix upstream) #:use-module (guix utils) @@ -486,7 +488,7 @@ list of AUTHOR/NAME strings." (and (string-prefix? "minetest-" (package:package-name pkg)) (assq-ref (package:package-properties pkg) 'upstream-name))) -(define (latest-minetest-release pkg) +(define* (latest-minetest-release pkg #:key (version #f)) "Return an for the latest release of the package PKG, or #false if the latest release couldn't be determined." (define author/name @@ -494,6 +496,12 @@ or #false if the latest release couldn't be determined." (define contentdb-package (contentdb-fetch author/name)) ; TODO warn if #f? (define release (latest-release author/name)) (define source (package:package-source pkg)) + + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "minetest"))) (and contentdb-package release (release-commit release) ; not always set ;; Only continue if both the old and new version number are both diff --git a/guix/import/opam.scm b/guix/import/opam.scm index 8a5aa4d8c6..59dbb7cb8b 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021, 2022 Alice Brenon +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,6 +36,7 @@ #:use-module ((guix build utils) #:select (dump-port find-files mkdir-p)) #:use-module (guix build-system) #:use-module (guix build-system ocaml) + #:use-module (guix diagnostics) #:use-module (guix http-client) #:use-module (guix ui) #:use-module (guix packages) @@ -417,8 +419,13 @@ package in OPAM." (member (build-system-name (package-build-system package)) '(dune ocaml)) (not (string-prefix? "ocaml4" (package-name package))))) -(define (latest-release package) +(define* (latest-release package #:key (version #f)) "Return an for the latest release of PACKAGE." + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "opam"))) (and-let* ((opam-name (guix-package->opam-name package)) (opam-file (opam-fetch opam-name)) (version (assoc-ref opam-file "version")) diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index af9809304f..e54df95985 100644 --- a/guix/import/stackage.scm +++ b/guix/import/stackage.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Xinglu Chem ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -139,9 +140,14 @@ included in the Stackage LTS release." (mlambda () (stackage-lts-packages (stackage-lts-info-fetch %default-lts-version))))) - (lambda* (pkg) + (lambda* (pkg #:key (version #f)) "Return an for the latest Stackage LTS release of PACKAGE or #f if the package is not included in the Stackage LTS release." + (when version + (error + (formatted-message + (G_ "~a updater doesn't support updating to a specific version, sorry.") + "stackage"))) (let* ((hackage-name (guix-package->hackage-name pkg)) (version (lts-package-version (packages) hackage-name)) (name-version (hackage-name-version hackage-name version))) 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")) From patchwork Sun Aug 28 13:18:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42025 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 1C99B27BBE9; Sun, 28 Aug 2022 14:20:35 +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 6AC5C27BBEA for ; Sun, 28 Aug 2022 14:20:33 +0100 (BST) Received: from localhost ([::1]:59252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDI-0002q2-IY for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICr-0002mN-5X for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICq-0002eG-T3 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-0006y0-OX for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 05/20] refresh: Allow updating to a specific version (gnu-maintenance) 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.166169275826531 (code B ref 57460); Sun, 28 Aug 2022 13:20:04 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:18 +0000 Received: from localhost ([127.0.0.1]:57774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC5-0006to-2F for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:17 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:37379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBu-0006s4-Bb for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:07 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MgNQd-1p473L2n3n-00hvlo for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:00 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 993C365A34; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:31 +0200 Message-Id: <51528a9d139e8178faa1365f49d29e55ed320ada.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:BXi9guQ90yR8iu8GW+yXtk819EoXQoF3nAAuP7jhDmg11QAyy1E ydiJ17TVrXlnnBYab2SxUrl620zdSKnbSnoSdD/lyJHebOcXKmIcGXXIeUSSOZkFq5WADs4 g5xdUGhZSa4FdSnHfJHzlvOqAwujIS255OoAMNJuUypa+eX9lvDuvpsqWf/RZbEDznS7c9u ZBnjNINv1Rp3w2QYj3mqA== X-UI-Out-Filterresults: notjunk:1;V03:K0:dnFfYUsUeMY=:kgx8/0hrHzXQ+3arTSP1HX nZwPKTmQc3o8whsuHCQiCzspOkdSCFVhZdy3/e+TdY9C0D8YIqCE0BSlQhke4z5VgSEj4l9tB xCh24FiYHchFeOQG3e0sh2EO44dI0Xb2Kcv2IbTiIx+bq4pIr4PWWbu+XnZ3RzMZmCWvTyLh2 DDS2izsKBsIWMtR+MDo3N5uBPjhjyzDEVCGAMTfm3ZLszMO+XI1XUHJTFXnRk9rS4TPnsMKVz FTMUgsWheKQE0Rsjy0O6+0z4s8zK0qjUKrKYFOZNRacXUAINFYRCXqPfyq6Mx0ZbFBk0X0Xq2 thCPsqWY/TKts6WbZh6Z/n8mF7yWcjR/k3cyd2Q+tUs9sOkiG7Iy597YAz/i/bBvu06JHM7tt ZdFjj+VmGwVIztiH7oaQOGluuhgVXOH35C9ayU2ats1wXQy+0v3kkpEtR8m8UTxRXEFQDRljd UyP0+bYKAnh4JCuD5vrJ9DunRtmd4+XQ8FO1QBlAUtuIrFmWwaPh/m3cOi9ou2JUR8TEEbwTc Aa4JNZV8W3EMHlmlsJ6Swq/Eb2t1Qwdo4v/TjeqOIJpsUfcNcAU97pVWpg6+UIAyjgQkqGh0Z v4+OafMvpoyLQEySWkUVvGM0Ted4vItensleJ/abO0JfOZIcTVNDpZkGFytG3q88oplGCMTiZ JcQQBHtj97mfOIH+ql4uoDrKSw05p4ahqmSWOFcYW/xwI9TH8QdtRyxatey1yniQR7hpcWh/M 01E004UeX7wfQ8xHvpudTFVBiBYOqY1l7Uwrf6tl8rqlnHm+/UWu1EwPTYc= 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 * guix/gnu-maintenance.scm (latest-ftp-release): Rename to (import-ftp-release), add keyword-argument 'version'. If version is given, try to find the respective version. (latest-html-release): Rename to (import-html-release), add keyword-argument 'version'. If version is given, try to find the respective version. (latest-gnu-release): Rename to (import-gnu-release), add keyword-argument 'version'. Refactor to first select archives for respective package, the find the requested or latest version, then create the upstream-source. (latest-release): Rename to (import-release), add keyword-argument 'version', pass on to import-ftp-release. (import-release*): Rename to (import-release*), add keyword-argument 'version', pass on to latest-release. (latest-savannah-release): Rename to (import-savannah-release), add keword-argument version, pass on to import-html-release. (latest-xorg-release): Rename to (import-xorg-release), add keword-argument version, pass on to import-ftp-release. (latest-kernel.org-release): Rename to (import-kernel.org-release), add keyword-argument 'version', pass on to import-html-release. (latest-html-updatable-release): Rename to (import-html-updatable-release), add keyword-argument 'version', pass on to import-html-release. * guix/import/gnu.scm(gnu->guix-package): Adjust function call. --- guix/gnu-maintenance.scm | 140 +++++++++++++++++++++++---------------- guix/import/gnu.scm | 2 +- 2 files changed, 84 insertions(+), 58 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 8446a59fb5..ea3394e9e8 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -328,8 +328,9 @@ name/directory pairs." files) result))))))) -(define* (latest-ftp-release project +(define* (import-ftp-release project #:key + (version #f) (server "ftp.gnu.org") (directory (string-append "/gnu/" project)) (file->signature (cut string-append <> ".sig"))) @@ -400,8 +401,11 @@ return the corresponding signature URL, or #f it signatures are unavailable." ;; Assume that SUBDIRS correspond to versions, and jump into the ;; one with the highest version number. - (let* ((release (reduce latest-release #f - (coalesce-sources releases))) + (let* ((release (if version + (car (filter (lambda (r) (string=? version (upstream-source-version r))) + (coalesce-sources releases))) + (reduce latest-release #f + (coalesce-sources releases)))) (result (if (and result release) (latest-release release result) (or release result))) @@ -413,13 +417,15 @@ return the corresponding signature URL, or #f it signatures are unavailable." (ftp-close conn) result)))))) -(define* (latest-release package +(define* (import-release package #:key + (version #f) (server "ftp.gnu.org") (directory (string-append "/gnu/" package))) "Return the for the latest version of PACKAGE or #f. PACKAGE must be the canonical name of a GNU package." - (latest-ftp-release package + (import-ftp-release package + #:version version #:server server #:directory directory)) @@ -435,14 +441,15 @@ of EXP otherwise." (close-port port)) #f))) -(define (latest-release* package) - "Like 'latest-release', but (1) take a object, and (2) ignore FTP +(define* (import-release* package #:key (version #f)) + "Like 'import-release', but (1) take a object, and (2) ignore FTP errors that might occur when PACKAGE is not actually a GNU package, or not hosted on ftp.gnu.org, or not under that name (this is the case for \"emacs-auctex\", for instance.)" (let-values (((server directory) (ftp-server/directory package))) - (false-if-ftp-error (latest-release (package-upstream-name package) + (false-if-ftp-error (import-release (package-upstream-name package) + #:version version #:server server #:directory directory)))) @@ -467,8 +474,9 @@ hosted on ftp.gnu.org, or not under that name (this is the case for (_ links)))) -(define* (latest-html-release package +(define* (import-html-release package #:key + (version #f) (base-url "https://kernel.org/pub") (directory (string-append "/" package)) file->signature) @@ -538,13 +546,17 @@ are unavailable." (match candidates (() #f) ((first . _) - ;; Select the most recent release and return it. - (reduce (lambda (r1 r2) - (if (version>? (upstream-source-version r1) - (upstream-source-version r2)) - r1 r2)) - first - (coalesce-sources candidates)))))) + (if version + ;; find matching release version and return it + (car (filter (lambda (r) (string=? version (upstream-source-version r))) + (coalesce-sources candidates))) + ;; Select the most recent release and return it. + (reduce (lambda (r1 r2) + (if (version>? (upstream-source-version r1) + (upstream-source-version r2)) + r1 r2)) + first + (coalesce-sources candidates))))))) ;;; @@ -576,46 +588,55 @@ are unavailable." (call-with-gzip-input-port port (compose string->lines get-string-all)))))) -(define (latest-gnu-release package) +(define* (import-gnu-release package #:key (version #f)) "Return the latest release of PACKAGE, a GNU package available via ftp.gnu.org. This method does not rely on FTP access at all; instead, it browses the file list available from %GNU-FILE-LIST-URI over HTTP(S)." + + (define (find-latest-archive-version archives) + (fold (lambda (file1 file2) + (if (and file2 + (version>? (tarball-sans-extension (basename file2)) + (tarball-sans-extension (basename file1)))) + file2 + file1)) + #f + archives)) + (let-values (((server directory) (ftp-server/directory package)) ((name) (package-upstream-name package))) (let* ((files (ftp.gnu.org-files)) + ;; select archives for this package (relevant (filter (lambda (file) (and (string-prefix? "/gnu" file) (string-contains file directory) (release-file? name (basename file)))) - files))) - (match (sort relevant (lambda (file1 file2) - (version>? (tarball-sans-extension - (basename file1)) - (tarball-sans-extension - (basename file2))))) - ((and tarballs (reference _ ...)) - (let* ((version (tarball->version reference)) - (tarballs (filter (lambda (file) - (string=? (tarball-sans-extension - (basename file)) - (tarball-sans-extension - (basename reference)))) - tarballs))) - (upstream-source - (package name) - (version version) - (urls (map (lambda (file) - (string-append "mirror://gnu/" - (string-drop file - (string-length "/gnu/")))) - tarballs)) - (signature-urls (map (cut string-append <> ".sig") urls))))) - (() - #f))))) + files)) + ;; find latest version + (version (or version + (and (not (null? relevant)) + (tarball->version + (find-latest-archive-version relevant))))) + ;; find archives matching this version + (archives (filter (lambda (file) + (string=? version (tarball->version file))) + relevant))) + (match archives + (() #f) + (_ + (upstream-source + (package name) + (version version) + (urls (map (lambda (file) + (string-append "mirror://gnu/" + (string-drop file + (string-length "/gnu/")))) + archives)) + (signature-urls (map (cut string-append <> ".sig") urls)))))))) (define %package-name-rx ;; Regexp for a package name, e.g., "foo-X.Y". Since TeXmacs uses @@ -668,7 +689,7 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." ;; HTML (unlike .) "https://nongnu.freemirror.org/nongnu") -(define (latest-savannah-release package) +(define* (import-savannah-release package #:key (version #f)) "Return the latest release of PACKAGE." (let* ((uri (string->uri (match (origin-uri (package-source package)) @@ -680,7 +701,8 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." "mirror://savannah"))) ;; Note: We use the default 'file->signature', which adds ".sig", ".asc", ;; or whichever detached signature naming scheme PACKAGE uses. - (and=> (latest-html-release package + (and=> (import-html-release package + #:version version #:base-url %savannah-base #:directory directory) (cut adjusted-upstream-source <> rewrite)))) @@ -744,21 +766,22 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." (when port (close-port port)))))) -(define (latest-xorg-release package) +(define* (import-xorg-release package #:key (version #f)) "Return the latest release of PACKAGE." (let ((uri (string->uri (origin-uri (package-source package))))) (false-if-ftp-error - (latest-ftp-release + (import-ftp-release (package-name package) + #:version version #:server "ftp.freedesktop.org" #:directory (string-append "/pub/xorg/" (dirname (uri-path uri))))))) -(define (latest-kernel.org-release package) +(define* (import-kernel.org-release package #:key (version #f)) "Return the latest release of PACKAGE, the name of a kernel.org package." (define %kernel.org-base ;; This URL and sub-directories thereof are nginx-generated directory - ;; listings suitable for 'latest-html-release'. + ;; listings suitable for 'import-html-release'. "https://mirrors.edge.kernel.org/pub") (define (file->signature file) @@ -772,7 +795,8 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." (directory (dirname (uri-path uri))) (rewrite (url-prefix-rewrite %kernel.org-base "mirror://kernel.org"))) - (and=> (latest-html-release package + (and=> (import-html-release package + #:version version #:base-url %kernel.org-base #:directory directory #:file->signature file->signature) @@ -801,7 +825,7 @@ GNOME packages; EMMS is included though, because its releases are on gnu.org." (or (assoc-ref (package-properties package) 'release-monitoring-url) (http-url? package))))) -(define (latest-html-updatable-release package) +(define* (import-html-updatable-release package #:key (version #f)) "Return the latest release of PACKAGE. Do that by crawling the HTML page of the directory containing its source tarball." (let* ((uri (string->uri @@ -817,10 +841,12 @@ the directory containing its source tarball." "" (dirname (uri-path uri)))) (package (package-upstream-name package))) + (catch #t (lambda () (guard (c ((http-get-error? c) #f)) - (latest-html-release package + (import-html-release package + #:version version #:base-url base #:directory directory))) (lambda (key . args) @@ -838,7 +864,7 @@ the directory containing its source tarball." (name 'gnu) (description "Updater for GNU packages") (pred gnu-hosted?) - (import latest-gnu-release))) + (import import-gnu-release))) (define %gnu-ftp-updater ;; This is for GNU packages taken from alternate locations, such as @@ -849,14 +875,14 @@ the directory containing its source tarball." (pred (lambda (package) (and (not (gnu-hosted? package)) (pure-gnu-package? package)))) - (import latest-release*))) + (import import-release*))) (define %savannah-updater (upstream-updater (name 'savannah) (description "Updater for packages hosted on savannah.gnu.org") (pred (url-prefix-predicate "mirror://savannah/")) - (import latest-savannah-release))) + (import import-savannah-release))) (define %sourceforge-updater (upstream-updater @@ -870,20 +896,20 @@ the directory containing its source tarball." (name 'xorg) (description "Updater for X.org packages") (pred (url-prefix-predicate "mirror://xorg/")) - (import latest-xorg-release))) + (import import-xorg-release))) (define %kernel.org-updater (upstream-updater (name 'kernel.org) (description "Updater for packages hosted on kernel.org") (pred (url-prefix-predicate "mirror://kernel.org/")) - (import latest-kernel.org-release))) + (import import-kernel.org-release))) (define %generic-html-updater (upstream-updater (name 'generic-html) (description "Updater that crawls HTML pages.") (pred html-updatable-package?) - (import latest-html-updatable-release))) + (import import-html-updatable-release))) ;;; gnu-maintenance.scm ends here diff --git a/guix/import/gnu.scm b/guix/import/gnu.scm index 2b9b71feb0..139c32a545 100644 --- a/guix/import/gnu.scm +++ b/guix/import/gnu.scm @@ -117,7 +117,7 @@ details.)" (unless package (raise (formatted-message (G_ "no GNU package found for ~a") name))) - (match (latest-release name) + (match (import-release name) ((? upstream-source? release) (let ((version (upstream-source-version release))) (gnu-package->sexp package release #:key-download key-download))) From patchwork Sun Aug 28 13:18:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42024 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 B020827BBEB; Sun, 28 Aug 2022 14:20:34 +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 1F6A327BBE9 for ; Sun, 28 Aug 2022 14:20:34 +0100 (BST) Received: from localhost ([::1]:59254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDJ-0002sn-9J for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICr-0002nN-Od for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICr-0002eM-F6 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICr-0006y7-AP for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 06/20] refresh: Allow updating to a specific version (crate) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:05 +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.166169275826538 (code B ref 57460); Sun, 28 Aug 2022 13:20:05 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:18 +0000 Received: from localhost ([127.0.0.1]:57776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC5-0006tt-WB for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:18 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:40735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBw-0006sh-U1 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:09 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MeCxd-1p1u7c1FQ7-00bJ9q for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:03 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id A47D265A36; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:32 +0200 Message-Id: <389c12814d8768fbdd34772442c48c8fa2aa5690.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:RlKTLacXSbDhwDkQPZOSEQxVbi7lorGgLup1JXlCj7wSJ1wTNqt 3GKdqhOsMnXWXneKIG6wv87QhMqaHIXq7kFZX0uDni9wgxuBSwGWHdV9UOx5DkROkPwaa/B t3yDFKWn+RuCpdjGTwEwn+Qm0gAXPBxfBBJKRvtiOIxzaO6W/qHU3z7GqkiCXJSQe3BPGhs Lt01EA2tvoseTa1KqnYuA== X-UI-Out-Filterresults: notjunk:1;V03:K0:eVMjIaqKPtg=:q18e9rQOwnkPnCil1ZJEHH ivb9VqqCA7mHRMyNYkEIjWueRZAY7n7jTh8GByBz26KXleLfcOq3KIKDVOeCgq1WxV+MMJV0f ts1lIjb/EVysVflXw2UGoRKRb101Ws8JOsZD+7odwaMCPAk4Mcu6pWHKG5b2GQzC0lIYeaVB/ QDjd1sBrD0z7ZPxncPlz+VkhloxkbVFALrXap1QIIrvIeAj1nTZJ/+C8C5Tq2Gub0bFXnQJUY +t4rz+gU/d3t1LObBxxwCVWGRl4dj6dkdpTN2FporidEAXYeGI6JbZR4iB+aYDC2o2zjkqvUW 9U1ty+ITyossRhUjqtILs7lZS0D87zl3tuVzN8557WUBZlBqOZxi/ek7trGvmK3xky6KpPSkf OH6L+vB/B5ozvWNCzeIB+k30ebbxNLHo9rYYtjvd6Jmcd/9eaZhicfVzDPW/Zzu0hsKrkYXJQ CcXkQx2DMJVSlYUliOAA7H4cG6H7DEJlKGbGlvq2fXp1IxFFO5PidkzZLNd1EmfMLCIPxbOY6 cws3MxB0RjextBhfbHYoNgXmW7ftl9mCAm9QhtcB0nm2Akjtb9jfD69rE8XKEI8GyWM9kimU7 wSa0deIIKjuWL1886Mxd+56v9yIuCWyvi3OPWS3JvRxF5nqx0eQzp/AuMhEMEo8rt/5hDilQM OLeFatYzwE88IXgeu4ObZI7MoXduxpqt7sDXyQKPp+rEGDb78B76AOfJj+qWWgtlZbM0vhelQ RAe104fqTGfqwS9omdsmk2fjf8xNzIqhfO/7n0Osi9S4iDa9N5sXBDY8amc= 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 * guix/import/crate.scm(latest-release): Rename to (import-release), add keyword-argument 'version'. If version is given, return an upstream-source for this version. --- guix/import/crate.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 51bfcd7bed..339eccd687 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2019, 2020 Martin Becze ;;; Copyright © 2021 Nicolas Goaziou +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -354,11 +355,11 @@ look up the development dependencs for the given crate." (define crate-package? (url-predicate crate-url?)) -(define (latest-release package) +(define* (import-release package #:key (version #f)) "Return an for the latest release of PACKAGE." (let* ((crate-name (guix-package->crate-name package)) (crate (lookup-crate crate-name)) - (version (crate-latest-version crate)) + (version (or version (crate-latest-version crate))) (url (crate-uri crate-name version))) (upstream-source (package (package-name package)) @@ -370,5 +371,5 @@ look up the development dependencs for the given crate." (name 'crate) (description "Updater for crates.io packages") (pred crate-package?) - (import latest-release))) + (import import-release))) From patchwork Sun Aug 28 13:18:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42027 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 5E64927BBEA; Sun, 28 Aug 2022 14:20:43 +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 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 1F81A27BBE9 for ; Sun, 28 Aug 2022 14:20:43 +0100 (BST) Received: from localhost ([::1]:44398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDS-0003Ur-9H for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICs-0002p3-Fp for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICs-0002eW-5I for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICs-0006yF-1e for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 07/20] refresh: Allow updating to a specific version (egg) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:06 +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.166169275826547 (code B ref 57460); Sun, 28 Aug 2022 13:20:06 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:18 +0000 Received: from localhost ([127.0.0.1]:57779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC6-0006tz-Cw for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:18 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:47017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIBz-0006sq-82 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:11 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MOQu6-1omaCV2VnK-00Pr3O for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:05 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id BD01265A38; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:33 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:Du4Zrg9rIFy8a5omSPBTdIu16A7LPLuKZmiX76MKtlB6ruDXH4i NPYOOWvR0fJuBmZwIJXIHXYvza/4qCmghH0ZZ4KGt32Fu6MUHTlunbU77Hbx/Q37f5ATJv+ U+aBTYnYIuRtDg6mTydmCnj7HFKfBJgiE+V+ZbaNzn1vHPX8Bqn3ZOZlI5sTjGMrkHVdHIN ZG77CGMV2OGZK9NnBjJMw== X-UI-Out-Filterresults: notjunk:1;V03:K0:Y4goSQ6FBEM=:mv8NKkL3t2Z2yOqTooo5Wu qjaF82nTs4rYhgLhLrHLRIYSxZfuKxpp0J4z7Zhq5vv49zy1OtfWteZ+ARE6+kalwFSxBVUMw Kdfo/DCuYmtRBRaaXYgERVWrJKEs9UFYgIAoIa9yKwMLNCv0ATlCep/4UYllu336iKLcbjdaI UBSO9xGSYRhfl5+PRyL3gPZw5bBxChAbXn/cWlrgkvo6/8eBLB2ZqP7uCSfWydDmCyRLg+6io VsT8161VW7z/CecKpO78hgyNweaLUf2FvN2Rg2rscY2sTMSKwtlsFp6B14rKxoL+2YKaGzbRS qU/u1jEGezDxt1cS9R/QU+PHID/v9Y4MTaFWQzk76zI69d5tgJnMoMaHMYTBenpozpp1uIPlk AkhhYkFo7xgE6hqti29Ooflwi0PFmpDbvDbEwB0jnbI1KwlvqiVHOwKFpChSLOwYMdWXI91ly 2TLyGh0QTbWVjEI6MThhCzcqydAsN20Mo0brv7/2JIiTmE0PEB1AZvwMKXm5Dw9SPvwafw5fx WWDHqD+lA3xi24hIG3khMpqwg0k85YI32kweWgPXntwW1pWskMJVMIQWxPjkC200XsdLc3EdA YLkx/PSKU11SoiYy8JYldRv3nXIr8bKK72caikRBAhj0D6IyehDB9e4TR2eOOhxM92XIWyWk8 WjJoEoYbQYylKMrXtsqNIrVdpDR5ILCz1an338m0X6vEdlLnfTuXG4axFqqFWYMTFTFAiWeQz zw3wpD/8IvafHDP3bbUnjfqIt2/AkShUhQVWRGuVm6vckalUG4PV/JoiWyI= 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 * guix/import/egg.scm(latest-release): Rename to (import-release), add keyword-argument 'version'. If version is given, return an upstream-source for this version. --- guix/import/egg.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guix/import/egg.scm b/guix/import/egg.scm index aa689f8d84..3897de5acf 100644 --- a/guix/import/egg.scm +++ b/guix/import/egg.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Tobias Geerinckx-Rice ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -333,10 +334,10 @@ not work." ;;; Updater. ;;; -(define (latest-release package) +(define* (import-release package #:key (version #f)) "Return an @code{} for the latest release of PACKAGE." (let* ((egg-name (guix-package->egg-name package)) - (version (find-latest-version egg-name)) + (version (or version (find-latest-version egg-name))) (source-url (egg-uri egg-name version))) (upstream-source (package (package-name package)) @@ -348,6 +349,6 @@ not work." (name 'egg) (description "Updater for CHICKEN egg packages") (pred egg-package?) - (import latest-release))) + (import import-release))) ;;; egg.scm ends here From patchwork Sun Aug 28 13:18:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42031 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 1609727BBEA; Sun, 28 Aug 2022 14:20:53 +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 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 8DD1027BBE9 for ; Sun, 28 Aug 2022 14:20:52 +0100 (BST) Received: from localhost ([::1]:46714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDb-000477-Nc for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICs-0002q3-TB for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICs-0002ef-KE for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICs-0006yM-Fa for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 08/20] refresh: Allow updating to a specific version (git) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:06 +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.166169275926559 (code B ref 57460); Sun, 28 Aug 2022 13:20:06 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:19 +0000 Received: from localhost ([127.0.0.1]:57781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC6-0006u7-Nq for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:19 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:46849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC1-0006sz-Vf for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:14 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MtOX2-1pHVAL3q8c-00uu6c for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:07 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id D076865A3A; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:34 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:geru7qQfw13bFNoFDMDerTnXHUgMdCsmemtrIJ1PcnPFSB5Wxt6 GiASyotvnOFnz80M8b0+zeNVS+BtmLDNl02XwVUK9cXb+xZfGurblfj0P4o00nvRFA0Pu7M DkrNIL1WxZ+oLGDoqcOt7wPq6Kj6zFHkJ7uR+sA7O2RWWd7Hyab0lK2IURHPiBNcWrimwHb Gi/mrWSIF4KnLxmLLCjVg== X-UI-Out-Filterresults: notjunk:1;V03:K0:t5VATJLeJ+Q=:CejxlN3BrksAyx2CoCx9Qg 1VVKSi9FfbNsVeBsMxU3DvVw9d5G/d4RXiX1fPAB2jvQKzfJsg1vSq+FBU4UF9Acsr65rj+5v SVXI2w/1PRFhiLOyxdE81/yVnMOqfe0ejZhdwH9W6yJPU7pNTCp6Vnb1/PesAQyYb+kYHrks0 yhMdQSopnoV4afPRNX2INXmO9HruDOxJbW0bjt3RndPkF8R2Y+cKGDESJ1UoXe0WXX1RtFVUG gDdXbkjJMAM6DorMD4TnPShPMqdqUoWRvrtPpfmDukaJ/mtt4GD/86IfbJAtb+uB4xo9kwiZq wT3FeSwOthJd6pxVkUMsdRf98JxMnQMQJBjnUZow8PFFdTchtgilOxKvKbEIw341kLfqNdmm4 hDeeRFZRKYEVpKeR7rdBDTyKAVGWnmn4ubfhcAzlCJ4GsXHz1sc+PCkn71k+tB0iHChPOoPva BmoIPixRZBoBdeX1L8wbTQdnluBXB96YQS6xFBbr6akAxYggZlkUZuNsA7gQfymP2gI1TB1P+ rFMp8Zli6esjPJ7148k2yWovspGyNkU2Al28EXUiPtfYBTN0Ayy2nfkhePeZH6I1bnIJmKP/b dy+bBu8/c86BtMcvIOsjkDOiZoaA2XlaYbQ16IgbI1ZkwMPAEqgFxI1wOkzzTpKoclMduh+og 6dnCyVmq9G0cAe6mYMcNZy0j92nf/lcetOPU58CsPEKG3JJIuy8NkzAVw7xcPv7ySDH/4uFlK Ku060t/Cw2x2CgWsDFouB84ZL6DCwVCOe45n+RHAr/+KuzwGUKplq4HVlcg= 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 * guix/import/git.scm (latest-tag): Add keyword-argument 'version'. If version is given, try to find the respective version tag. (latest-git-tag-version): Add keyword-argument 'version' and pass it on to called functions. (latest-releease) Rename to (import-release), add keyword-argument 'version' and pass it on to called functions. --- guix/import/git.scm | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/guix/import/git.scm b/guix/import/git.scm index bb5ba4d97e..fdac51edfd 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2022 Maxime Devos +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -146,7 +147,8 @@ version corresponding to the tag, and the cdr is the name of the tag." tags) entrytags) (git-no-valid-tags-error)) (else - (match (last versions->tags) - ((version . tag) - (values version tag))))))) - -(define (latest-git-tag-version package) + (let ((version-to-pick + (if version + (filter (lambda (vt) (string=? version (car vt))) + versions->tags) + versions->tags))) + (if (null? version-to-pick) + (values #f #f) + (match (last version-to-pick) + ((version . tag) + (values version tag))))))))) + +(define* (latest-git-tag-version package #:key (version #f)) "Given a PACKAGE, return the latest version of it and the corresponding git tag, or #false and #false if the latest version could not be determined." (guard (c ((or (git-no-tags-error? c) (git-no-valid-tags-error? c)) @@ -193,6 +202,7 @@ tag, or #false and #false if the latest version could not be determined." (url (git-reference-url (origin-uri source))) (property (cute assq-ref (package-properties package) <>))) (latest-tag url + #:version version #:prefix (property 'release-tag-prefix) #:suffix (property 'release-tag-suffix) #:delim (property 'release-tag-version-delimiter) @@ -206,12 +216,13 @@ tag, or #false and #false if the latest version could not be determined." (git-reference? (origin-uri origin)))) (_ #f))) -(define (latest-git-release package) +(define* (import-git-release package #:key (version #f)) "Return an for the latest release of PACKAGE." (let* ((name (package-name package)) (old-version (package-version package)) (old-reference (origin-uri (package-source package))) - (new-version new-version-tag (latest-git-tag-version package))) + (new-version new-version-tag + (latest-git-tag-version package #:version version))) (and new-version new-version-tag (upstream-source (package name) @@ -226,4 +237,4 @@ tag, or #false and #false if the latest version could not be determined." (name 'generic-git) (description "Updater for packages hosted on Git repositories") (pred git-package?) - (import latest-git-release))) + (import import-git-release))) From patchwork Sun Aug 28 13:18:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42033 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 068F027BBE9; Sun, 28 Aug 2022 14:21:03 +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 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 2CC6127BBEA for ; Sun, 28 Aug 2022 14:21:02 +0100 (BST) Received: from localhost ([::1]:50168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDl-0004d3-Ap for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICt-0002rH-Hj for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICt-0002eq-0Y for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICs-0006yU-SR for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 09/20] refresh: Allow updating to a specific version (github) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:06 +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.166169275926565 (code B ref 57460); Sun, 28 Aug 2022 13:20:06 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:19 +0000 Received: from localhost ([127.0.0.1]:57783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC7-0006uK-Dh for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:19 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:59167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC3-0006tM-Ox for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:16 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MxVbb-1pL5fj11WT-00xqLA for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:10 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id E3D5E65A3C; Sun, 28 Aug 2022 15:18:55 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:35 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:PfeJ35VcRxtNmMGHp2NMpFQT05jdZuZEz9PsfoMT40UQqOTs58h D7tyPEOzsqpdxAXkWmFzQQN5is/WJ2APfgjggUmPgw6iMsz52ErfuAebi2vV/FpySAqfoHO TKOTCiEsPZje53beSbUFvO34jx/geoTCbetR4PTh0q7crrE0zbd7zPrAc4azJ/3R9PgcFzo qQHvuhX7N26ukY9vvoLIg== X-UI-Out-Filterresults: notjunk:1;V03:K0:xjkjup0Eedo=:zQ/E1LFUlXfnYQ8dTdGmtp nEIDHRxlSWC0h630Seu9m3p3y9avXaMIYAnYiJpyKUC/JCQpZxuP7NuOAYT60q2qvilkqSQfk gUoW2pNxIwRFa5tyRRc/LzAMGZr+yFWMr7oUcaq7kq5nZelRVsH2CY1ZGNX2f+54d+ngqAC9f 9MQ5eKUNy89N6w/mJ2tQFAkPpYonJy1aisH0tXNZ+ff+i5Q9ySaAafF99HMor2k09p4L5UZHi IwF0glEVzqnre0kYADGv5CzQ/iGwswXfcqspo/7hjOd/8nF1t5aFSQZKBYCFz9pBc6qHlHqvT Kx8Ql4Q8gQ5kqtWAj2y4YV+bUXKVbMwpCuKgqFueL0dkZlR/wmN1GSf8u5CR9GPzt9+JgM63+ AHoZUgbh/6Fr9W+gGYii3Ein5/Xw51fQvHJwlg0cmnXVCj4UrJytw6bShAxoVlM24fViSeXpL B64W+cEWFFh0aq1ctdb3jtG9teWTwKC6MrfrM6cFVcdghlLcLeDbtinXCntARPEeh0RxfM6bK gmczpz6z2Z1RcQIRltlEhmy/8se2qvkmn+haNppuyTE6eoZ5NZljk1oyQp6EZw4EXZf3paU4S KMF+Yjwbeq+cqv6LrmxgVyETlkTNySEfASttd0VYu39Aqb+vHnXG0VXp0NhEhtoAaodB7clvd sps8NJIiC+Np4psgx+D5nZVCg2fuGSpYTwNbJOx/DU3x+UU9wDdn1t4QFMc6kKATp84wS0qT+ UwbSFNkoUjQeZaiRQhJX0pLBF7tr7YGgg4z+c22nW3C3A27HpvxnRzERrAY= 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 * guix/import/github.scm(latest-released-version): Add keyword-argument 'version'. If version is given, try to find the respective release. (latest-releease) Rename to (import-release), add keyword-argument 'version' and pass it on to latest-released-version. --- guix/import/github.scm | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/guix/import/github.scm b/guix/import/github.scm index ac6ef06eda..facdc96e24 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -249,7 +249,7 @@ Alternatively, you can wait until your rate limit is reset, or use the #:headers headers))) (x x))))))))) -(define (latest-released-version url package-name) +(define* (latest-released-version url package-name #:key (version #f)) "Return the newest released version and its tag given a string URL like 'https://github.com/arq5x/bedtools2/archive/v2.24.0.tar.gz' and the name of the package e.g. 'bedtools2'. Return #f (two values) if there are no @@ -290,15 +290,21 @@ releases." (match (and=> (fetch-releases-or-tags url) vector->list) (#f (values #f #f)) (json - (match (sort (filter-map release->version - (match (remove pre-release? json) - (() json) ; keep everything - (releases releases))) - (lambda (x y) (version>? (car x) (car y)))) + (let ((releases (filter-map release->version + (match (remove pre-release? json) + (() json) ; keep everything + (releases releases))))) + (match (if version + ;; find matching release version + (filter (lambda (x) (string=? version (car x))) + releases) + ;; sort releases descending + (sort releases + (lambda (x y) (version>? (car x) (car y))))) (((latest-version . tag) . _) (values latest-version tag)) - (() (values #f #f)))))) + (() (values #f #f))))))) -(define (latest-release pkg) +(define* (import-release pkg #:key (version #f)) "Return an for the latest release of PKG." (define (github-uri uri) (match uri @@ -313,7 +319,8 @@ releases." (source-uri (github-uri original-uri)) (name (package-name pkg)) (newest-version version-tag - (latest-released-version source-uri name))) + (latest-released-version source-uri name + #:version version))) (if newest-version (upstream-source (package name) @@ -330,6 +337,6 @@ releases." (name 'github) (description "Updater for GitHub packages") (pred github-package?) - (import latest-release))) + (import import-release))) From patchwork Sun Aug 28 13:18:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42030 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 B0F5227BBEA; Sun, 28 Aug 2022 14:20:51 +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 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 412BD27BBE9 for ; Sun, 28 Aug 2022 14:20:51 +0100 (BST) Received: from localhost ([::1]:46712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDa-00041K-Dp for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICt-0002tI-Ut for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICt-0002fC-Kd for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICt-0006yb-9B for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 10/20] refresh: Allow updating to a specific version (gnome) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:07 +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.166169277926644 (code B ref 57460); Sun, 28 Aug 2022 13:20:07 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:39 +0000 Received: from localhost ([127.0.0.1]:57793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICQ-0006vf-QQ for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:39 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:52315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC6-0006tV-3s for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:18 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N5G5b-1pSkeT2LZd-011ByZ for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:12 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 05BCF65A3E; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:36 +0200 Message-Id: <772d6b613a69ae950b657d94a51019928fdfca5b.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:R8QWX9bMVfrvyHLNmZf6nwv8Fs/dc6W5qtQ7AmCsoc4qKdkk5/G ofbqIPGwQYstOBl+L4sK/hgg7kx//HH+WuVvfhgTSChmSxuj81Z6AFN18u7zY28lkQKdUEJ HmW0foy3n7+9+c+xbgvTajeA8nw88hcPGOsrtpgFjkRh+npF/GgxXwOgdEF6k7aMvF/NtIb D5BTOusW/lsf4yDzqSnhA== X-UI-Out-Filterresults: notjunk:1;V03:K0:HaZAM0MM3Dk=:M7S9enD+0DoNbr2fVU3tR1 JGDKaAIXSDxfuw6DKuapz8J5YMwqUXS/kTy8nCxbUUJd6r4azgU9EIsn2Nax+TAp6tFbaPR+q gm8wXbnS9EpR2OT3YPTteaZfO2e68i+wz5fe/8cm+/oeZFpJZo57o/bl/dSV5XfNjk5/dJatr NxdvDpLCB7qZezL3x77TXfWhzIH8U5ErrAzFbp0e2lzpGe+pprZlu/dNtn2jBuaVNcwS/LllH 5MGpTYCM5MU4ogNXpeeT0Fj+C7vpPRl+E/YQl7lmMoQPyhn23yApPCDNOY5H1Abe4jTdCNZRv cnoql8Yg8IWgelzfC3TZ/bQrcqNpFId7D+ZE/dJjhcaC4UeJO9RqJvbPWc1TjAe4VhuDcDlu2 FXUsguDiPc4nMHcjVOoxeIlOTIFCB6bQyQKLra03A0f/LQ95Hqe8M4wzFnurBIJRR2AWt0a8p qay+IIANMz0Dvuw5hmIVOWS0XkExPdsAeeR/JJc4G1cOWaPAlIjDSkIcLOqmayGvyKKed3c0m p46ra9z/1Y+8R2C3vzec370udNf+qr2vNIOqz7PbIrWrtWmh4Jcojsa8pwdjuDQ31W9WY/lyO 7yYMNBXZ50ZoXMNfvawmR/7tAeb2HjQ80L6SyuwPI8uPrEUWhSHPjLO5KNVzO+gls7A17p/LD d8qVPMWZT6OH8rBDG+71hBNnIraZgF2JyD9wNGYrvWXoZoHoYa/9IIdj8hhgfviQ9Zc27vN0a O49N6M0w8VxueTG+jwNcA8OSJ2UVfgZuvpq3Z1kMntlshPVHlyyrz/6+qJQ= 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 * guix/import/gnome.scm(latest-gnome-release): Rename to (import-gnome-release), add keyword-argument 'version'. If version is given, try to find the respective version [find-latest-release]: New function, based on former code. [find-version-release]: New function. --- guix/import/gnome.scm | 47 ++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm index 3562e17e0f..496c253969 100644 --- a/guix/import/gnome.scm +++ b/guix/import/gnome.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2019, 2021 Ludovic Courtès +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,7 +55,7 @@ source for metadata." name "/" relative-url)))) '("tar.lz" "tar.xz" "tar.bz2" "tar.gz"))))))) -(define (latest-gnome-release package) +(define* (import-gnome-release package #:key (version #f)) "Return the latest release of PACKAGE, a GNOME package, or #f if it could not be determined." (define %not-dot @@ -72,6 +73,31 @@ not be determined." ;; Some packages like "NetworkManager" have camel-case names. (package-upstream-name package)) + (define (find-latest-release releases) + (fold (match-lambda* + (((key . value) result) + (cond ((even-minor-version? key) + (match result + (#f + (cons key value)) + ((newest . _) + (if (version>? key newest) + (cons key value) + result)))) + (else + result)))) + #f + releases)) + + (define (find-version-release releases version) + (fold (match-lambda* + (((key . value) result) + (if (string=? key version) + (cons key value) + result))) + #f + releases)) + (guard (c ((http-get-error? c) (if (= 404 (http-get-error-code c)) #f @@ -92,20 +118,9 @@ not be determined." (match json (#(4 releases _ ...) (let* ((releases (assoc-ref releases upstream-name)) - (latest (fold (match-lambda* - (((key . value) result) - (cond ((even-minor-version? key) - (match result - (#f - (cons key value)) - ((newest . _) - (if (version>? key newest) - (cons key value) - result)))) - (else - result)))) - #f - releases))) + (latest (if version + (find-version-release releases version) + (find-latest-release releases)))) (and latest (jsonish->upstream-source upstream-name latest)))))))) @@ -114,4 +129,4 @@ not be determined." (name 'gnome) (description "Updater for GNOME packages") (pred (url-prefix-predicate "mirror://gnome/")) - (import latest-gnome-release))) + (import import-gnome-release))) From patchwork Sun Aug 28 13:18:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42035 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 DECFB27BBEA; Sun, 28 Aug 2022 14:21:14 +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 A582727BBE9 for ; Sun, 28 Aug 2022 14:21:14 +0100 (BST) Received: from localhost ([::1]:58552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDx-00055u-S2 for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002uD-Az for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002fT-24 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICt-0006yk-UE for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:07 +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.166169277926657 (code B ref 57460); Sun, 28 Aug 2022 13:20:07 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:39 +0000 Received: from localhost ([127.0.0.1]:57795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICR-0006vh-7O for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:39 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:38897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSIC8-0006tf-G3 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:20 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mn2iP-1pAfZN3jfT-00k4XN for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:14 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 0E1E965A40; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:37 +0200 Message-Id: <84d6e3731a5c8ac6a76c9810356f478c25b1d8d2.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:PeG4XRPZBsA0T6yqwzeR7k76eCTyT2BEtN/qP581V1GR3CfZizt 1uIjizvnGgewFwf2+hAIxG8p3q+YVU2yx4LLyzclc4a7hQIh/wRKbhj+i/kIUyi1bBWoKr+ V2Sicyn2BlwenkV1loYC/5d/mdd0tZU0KIDPO4IElXuPIEUv7QSxiD2dFzPa6K3TjaNxZfP 2w9TlghYH7IVsIWGdUnXw== X-UI-Out-Filterresults: notjunk:1;V03:K0:5cMQNAsV6mU=:cHwMlFtOx6hEjzDeK/Suz4 cmlrwBZlvOGNLtoCW66Kyb6sERpeFjkPTJnCcqeDYzuKSh5BQt2cbx0zXoQ6AZ3tJhJSFChrn /964SvjUu9DO9OueV73fW7PujtxomxDdyZmcqAusBPBKMFpQ6A6z3bybYdNNZz3IJSj8HEvGW 2Wfnpl5Y9KqSebQ2e7GYwJ+y0n9n0dT2sPCXz7XRX4tcAcXloeYWPYBY7o1bbw0Rjyzi+w6C/ awj4Nr5SAY3ZevbDXVhU7IKEbCfyLpqCwGHwP2wsMWE+JiAE0wskHjx2KoMfVZ5A8bNcEshTx IyccNJkze5XvnCoUs+tIY/xjBj463ipLaWrC+4JUy1LLNMNG3/FltB22YmtWe/SpIS9tSZcdG d8G1eWR3V8q8PFfWuahFHQx6iVs2N4zxND4/c8P4l9Xh/wFojaPWnrpP4og3H84lW2L3N4sZp 936kTlHNEjUHTdDUNV1RYLf+Gfpl2k3SKJZyg9tRPAdnO36Z4GPum5EQvB328qaoIZu0vSx2q EUmhoouA97NERygaf0YFElNMKM8vKO3TJkLt1eL9TQigibRikHGVQmT1XxivznW+pNMOOv8CD TpSk0CPiysqluhNpuTDbZNr1uWus7dzsTpmYX0udkzixnrD0T/IDSpHJ+UXb9tf5oo266447R F53+RQLEYM3rWvnttnBmhxNLt5xa0P+8zElLodSav0Zv/n9WUkO6i91DkJ5KKjM630SOcdxBr GUKWw9jyA5fbDTWzMSXE4uMVQsAP5JgC45cnsLFBq+hL+xHC3Zs2ZkANOGU= 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 * guix/import/hexpm.scm(latest-release): Rename to (import-release), add keyword-argument 'version'. If version is given, return an upstream-source for this version. --- guix/import/hexpm.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/import/hexpm.scm b/guix/import/hexpm.scm index 3b63837393..652df5dd0e 100644 --- a/guix/import/hexpm.scm +++ b/guix/import/hexpm.scm @@ -328,11 +328,11 @@ latest version of PACKAGE-NAME." ;;; Updater ;;; -(define (latest-release package) +(define* (import-release package #:key (version #f)) "Return an for the latest release of PACKAGE." (let* ((hexpm-name (guix-package->hexpm-name package)) (hexpm (lookup-hexpm hexpm-name)) - (version (hexpm-latest-release hexpm)) + (version (or version (hexpm-latest-release hexpm))) (url (hexpm-uri hexpm-name version))) (upstream-source (package (package-name package)) @@ -344,4 +344,4 @@ latest version of PACKAGE-NAME." (name 'hexpm) (description "Updater for hex.pm packages") (pred (url-prefix-predicate hexpm-package-url)) - (import latest-release))) + (import import-release))) From patchwork Sun Aug 28 13:18:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42028 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 7F2E227BBEA; Sun, 28 Aug 2022 14:20:44 +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 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 F022D27BBE9 for ; Sun, 28 Aug 2022 14:20:43 +0100 (BST) Received: from localhost ([::1]:44402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDT-0003Xk-49 for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002vj-Or for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002fd-Es for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICu-0006yr-Aj for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 12/20] refresh: Allow updating to a specific version (kde) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:08 +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.166169278026665 (code B ref 57460); Sun, 28 Aug 2022 13:20:08 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:40 +0000 Received: from localhost ([127.0.0.1]:57798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICR-0006vu-Lg for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:39 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:59383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICA-0006tp-Ph for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:23 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N3bCH-1pR5xW0v8F-010aTi for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:17 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 247BE65A42; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:38 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:wUOoZFisOBafod6k2k9c2ozHRPPdSEYOjZPtTZWQKBiriA6iQte Uo/A2KJXnFGsmLu/ikfoVarNOJGa12R2SakgOdQpN+Gw8EW9+b08nKgM5u2phWanMQgsG8J ylssVJFmzij+LtE7aOfpcA6Qj+iGhOY3LEeHT2UMOPFz5ekAoQ/ppN889+r/4uPRKch6joC 66JWWtOgV0mcXyQ0AVLeA== X-UI-Out-Filterresults: notjunk:1;V03:K0:RD3zSTq95x4=:Qs2VcSnIDCabor0lR9PVSG i6ckBoTamyOOD/PTbX/NtoRdiiYeRs31H9oXEzROQK1nItMVVKBuRnPfwGzx6dmqUrea3qWlF KBlkYsCkiPHyAonkdItNoPsiJdp52IYIxwXksVpp5hp5nMMy2tbHt+87AvE/zK8kAVjK1U3FE 6JmULLh5aF3xQ53f3C9+dH1YO7Q+O6MfHyarF80A06dmScN7IF3vGC/1Na2Yu1iuoLtNE1oEQ aBSYcntElNs5gtqSkPefy5R9SmKH0JORRZK/wi2eiEkqBw7CM68Rix/AonA4rpSRIFWI5yVLm zqXwiROrhW6O0ExcykcDULiVVmRiklmg/LzaAHrgNBgByhjjCzVXrIxq4bTT+UIn3YE9U9us0 gQwFhs2blFNkPHlxE9dWV7DN+pGS7xZZ5yFL+6zK/7PUtadCMZy8QeEbyYapUDlwnJ1iwxtxa zYqYyRci1Nx3ONcVTII72Lbe0smk1Wys2c8EwflQSiP5uFPOm6McWNAOC833f0nAXcDTmPw61 F/LhOvAzPc2+o00/Ajn/eekxr67GY+GVcYeS59Q8qIa25logtnwlsO80oy7YrhWgq7V1mqECd P5oRIGRJuBZ54fO5HF4qu2wNDzNDOQM6OhKwI5OeeZCz6nniFTX7ckIXIvY53DOsL21LREaY+ vI7Wg3GKyvv7AreHRSESHb1NMMYqUWDyG33RcfE7UcSoiLROJyoloBGlK/8e1lrxxkoGrxT1I 0aLgvS9USnB4flv2fnoEurTYZGiOUayLDqw2hKMQAAk1nzIGmBRgbtdDmwY= 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 * guix/import/kde.scm(latest-kde-release): Rename to (import-kde-release), add keyword-argument 'version'. Rework the code to not sort the relevant files, but just find the requested or latest version. [find-latest-archive-version]: New function. --- guix/import/kde.scm | 58 ++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/guix/import/kde.scm b/guix/import/kde.scm index 510d823a4f..d364e44edb 100644 --- a/guix/import/kde.scm +++ b/guix/import/kde.scm @@ -28,6 +28,7 @@ #:use-module (ice-9 match) #:use-module (ice-9 rdelim) #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (web uri) @@ -149,42 +150,51 @@ Output: (string-join (map version->pattern directory-parts) "/") "/")))) -(define (latest-kde-release package) +(define* (import-kde-release package #:key (version #f)) "Return the latest release of PACKAGE, a KDE package, or #f if it could not be determined." + + (define (find-latest-archive-version archives) + (fold (lambda (file1 file2) + (if (and file2 + (version>? (tarball-sans-extension (basename file2)) + (tarball-sans-extension (basename file1)))) + file2 + file1)) + #f + archives)) + (let* ((uri (string->uri (origin-uri (package-source package)))) (path-rx (uri->kde-path-pattern uri)) (name (package-upstream-name package)) (files (download.kde.org-files)) + ;; select archives for this package (relevant (filter (lambda (file) (and (regexp-exec path-rx file) (release-file? name (basename file)))) - files))) - (match (sort relevant (lambda (file1 file2) - (version>? (tarball-sans-extension - (basename file1)) - (tarball-sans-extension - (basename file2))))) - ((and tarballs (reference _ ...)) - (let* ((version (tarball->version reference)) - (tarballs (filter (lambda (file) - (string=? (tarball-sans-extension - (basename file)) - (tarball-sans-extension - (basename reference)))) - tarballs))) - (upstream-source - (package name) - (version version) - (urls (map (lambda (file) - (string-append "mirror://kde/" file)) - tarballs))))) - (() - #f)))) + files)) + ;; find latest version + (version (or version + (and (not (null? relevant)) + (tarball->version (find-latest-archive-version relevant))))) + ;; find archives matching this version + (archives (filter (lambda (file) + (string=? version (tarball->version file))) + relevant))) + (match archives + (() #f) + (_ + (upstream-source + (package name) + (version version) + (urls (map (lambda (file) + (string-append "mirror://kde/" file)) + archives))))))) + (define %kde-updater (upstream-updater (name 'kde) (description "Updater for KDE packages") (pred (url-prefix-predicate "mirror://kde/")) - (import latest-kde-release))) + (import import-kde-release))) From patchwork Sun Aug 28 13:18:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42032 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 5199C27BBEA; Sun, 28 Aug 2022 14:21:01 +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 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 0823827BBE9 for ; Sun, 28 Aug 2022 14:21:01 +0100 (BST) Received: from localhost ([::1]:50166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDk-0004ZM-6S for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICv-0002wf-4M for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICu-0002fr-QX for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICu-0006yy-Ma for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 13/20] refresh: Allow updating to a specific version (launchpad) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:08 +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.166169278026672 (code B ref 57460); Sun, 28 Aug 2022 13:20:08 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:40 +0000 Received: from localhost ([127.0.0.1]:57800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICS-0006w2-0t for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:40 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:55779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICD-0006uV-4k for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:25 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MBDva-1oZOwb2E4E-00Cf86 for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:19 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 3300665A44; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:39 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:7uVrN269qPlYhoB5DRN6/lf4fPiM2x0jjUxhiaPg3y+7Uz6FQHX rS0z33+XcHJ8sbSd4D4BSzvfm1+796aVme74EQNJaU90psqQmT6N+2/8qtmzSX6qg2CBQcB FGV8G77/jJGLRJ2Hx5MS5aY/oiLvvo2Vp+xi/K116DRCs2vmyOxmXqklYXMiispIgtlg4a+ yBVlAl5xUcY4byaiETlag== X-UI-Out-Filterresults: notjunk:1;V03:K0:A6MP/1+1JXo=:bPOcaFlU/IF/PzmcYQGt7D fFnZSta+XO9j7aKcryxfp/nzO7eJqmWoyhR869GtU681uRQ1h0nd4zGHk9FzfhUnA8kN18UJv lsAKn1Y5O5/22lvT/dEjke99/iWFjSG2d1BgBgwju3XdbP//2X8dF1THeJlOvxUrofSdytsgt YDtVqXTowZr5smknf5HhAVahXE50h4wnvKxRcgAAJZPeQlnWghImDgjCjt00HHOHuNo6EnJYS Pxw4ouOJG834lAfbeSCp1RwSPR8U8uF/tICI4n7k+u8WbntEIqY31zrbZegbm52wGFDZ8Qlno k+HAkrIr/x4qiptRn6XUaiFJUHGtRu4OSIFR8PURJddn8OH2MVOYmDXNQMCyCncik6TK0/TBb 7lV2G52nwXUUDvftH8C1Ik1eA53YNqKWW6oHGk7NJKhYuRXOjic86Kq1/XNTK78H8ChlE0UWN 1Ge8XP1cBptA9tJmI0hpwjj+4uTAhrtlgfTDzkD1vCGXMdHm5tpisESnMWcoDRlHbxQu01LWo nZIdwhm1HsiOWo246FwbSqw3Is+8qhXWq3AvlaiSpZia3Z/U/jShogHYAfS9/mTbXLLHwv30h 3d+c8UjnLLS/EKGrjJrzr0RzWk3fp+9z4c6Au0Hzw2k/LGSOHZtk2h0aP1kdQyHXzgc0TERcv 7jfxi9oJlDwUW/hgI/zhsC2NMK3T51n/tbGUgNQRxH+aBZ40mHhX7AdrT6qcZEDveeMbbWnjA tCU7N8K5bNGS0OTRyzSAwbwaT5Qfz4j27Hz135j667T/V+2qQVYPjf7K4IY= 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 * guix/import/launchpad.scm(latest-release): Rename to (import-release), add keyword-argument 'version'. If version is given, return an upstream-source for this version. --- guix/import/launchpad.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/guix/import/launchpad.scm b/guix/import/launchpad.scm index b7e0295c4e..2112eefe1d 100644 --- a/guix/import/launchpad.scm +++ b/guix/import/launchpad.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019, 2020 Arun Isaac ;;; Copyright © 2021 Matthew James Kraai ;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -121,7 +122,7 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (last (remove pre-release? (vector->list (assoc-ref json "entries")))) "version")))) -(define (latest-release pkg) +(define* (import-release pkg #:key (version #f)) "Return an for the latest release of PKG." (define (origin-launchpad-uri origin) (match (origin-uri origin) @@ -132,7 +133,7 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (let* ((source-uri (origin-launchpad-uri (package-source pkg))) (name (package-name pkg)) (repository (launchpad-repository source-uri)) - (newest-version (latest-released-version repository))) + (newest-version (or version (latest-released-version repository)))) (if newest-version (upstream-source (package name) @@ -145,4 +146,4 @@ for example, 'linuxdcpp'. Return #f if there is no releases." (name 'launchpad) (description "Updater for Launchpad packages") (pred launchpad-package?) - (import latest-release))) + (import import-release))) From patchwork Sun Aug 28 13:18:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42034 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 C733B27BBEA; Sun, 28 Aug 2022 14:21:13 +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 6226427BBE9 for ; Sun, 28 Aug 2022 14:21:13 +0100 (BST) Received: from localhost ([::1]:58550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDw-00052s-IH for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICv-0002xp-Fp for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICv-0002g1-65 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICv-0006z6-2K for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version (pypi) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:09 +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.166169278126679 (code B ref 57460); Sun, 28 Aug 2022 13:20:09 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:41 +0000 Received: from localhost ([127.0.0.1]:57802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICS-0006w9-El for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:40 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:42361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICF-0006uf-F8 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:28 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Moewz-1pCKG03SxN-00p2TP for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:21 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 4151165A47; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:40 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:+gTz6KGT+7cvLoGgqJOz/vjRacYbZUjg36DnATmMV/ZD/2d4wPI /GiBklPlYl3mIqfvLhxD0WUDRF4EMToyWBBrOoXIBK6KykcLuXQAQX5nCszFSpQY9YFyYef LZvDPphk2xODaL/yCB0PpYIfRPwApBMFEgC9CYsUmcJy4wb+GZz8BAjYCtdveKvgzvGNYA8 3jFlu7X1qTqp4av5n7cvQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:QYTumhzo3kw=:4NC9q5szv10vKx7NMxsj1u hgIAz9CGMaFjJyVw9mbKDqSU9dJbZJDkdryjmOhSa59fExleVm/ye4Gq0+WcCF7/Y2tI3zBE3 XcpXoi13+TYFiJ9UB+CLZehY1tSg9SQLOKXvFWLwcMSa5KjB8k06Hs9Kb3g7I5nL51P+xwwXB 7LAGZIGoR835GVyN4H5CdV6QCw7GgP+lVsd3CZbrHUuNYwiUJ8RQcvrPDNlVm9bjLPwzgGkR7 RZr8PX50RENvC/V8hkqD5TgCIEhlIUSqn/rAsdRG8XuiEyECpHbodXCYOycldBzvfEvy5MXAH i0T5ivBRyDztkUVccKRDoUAtbx4585dnz+cNFm07GUktYwt9kUFXYEpIFVeHuyws9TZFdEiGM DHqFh5M58yyqFVrjSRtkTa28i3O5ODphocB361f5FyBdrWX0Bp1HGzQ+g1Cb9rSVeLaZMbtml /nalYNLIl4aMdjim8sbYBLtkIxLhy1y1IziRa/40Hbp96cefGkt9tyQmmLNjYBA5IyOr2H3HX B/BL5aFsZjtz/Ra71lywAFZQpQnjYRdWNqQpva65SU6PAj+vIcjdCeDQuUugcknPy9lkhXQ5S GT1bY8KFQgw6UpJi1KPx/f1E1RKveaWBtieUnM55tklDPvdEuWHN7Xov2H+FJLdH3X8YLa5P6 sZF+Gt7tRWG44P4skiIpWru8RQYPEkf85ie3SqgVVK1y+SMjItqgJllhDzrWr6UPCJDbICL7e 9YO/9UA/NRCEwhTzc9Fr3ZWc8qqH6zsUI7juH0T7O1c9KwPeN5c9ocf6jj0= 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 * guix/import/pypi.scm(latest-release): Rename to (import-release), add keyword-argument 'version' and pass it on to called functions. --- guix/import/pypi.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 3e3e949283..1ab48de71b 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2021 Marius Bakke ;;; Copyright © 2022 Vivien Kraus ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -556,15 +557,15 @@ source. To build it from source, refer to the upstream repository at (string-prefix? "https://pypi.org/packages" url) (string-prefix? "https://files.pythonhosted.org/packages" url))))) -(define (latest-release package) +(define* (import-release package #:key (version #f)) "Return an for the latest release of PACKAGE." (let* ((pypi-name (guix-package->pypi-name package)) (pypi-package (pypi-fetch pypi-name))) (and pypi-package (guard (c ((missing-source-error? c) #f)) (let* ((info (pypi-project-info pypi-package)) - (version (project-info-version info)) - (dist (source-release pypi-package)) + (version (or version (project-info-version info))) + (dist (source-release pypi-package version)) (url (distribution-url dist))) (upstream-source (urls (list url)) @@ -574,7 +575,7 @@ source. To build it from source, refer to the upstream repository at #f)) (input-changes (changed-inputs package - (pypi->guix-package pypi-name))) + (pypi->guix-package pypi-name #:version version))) (package (package-name package)) (version version))))))) @@ -583,4 +584,4 @@ source. To build it from source, refer to the upstream repository at (name 'pypi) (description "Updater for PyPI packages") (pred pypi-package?) - (import latest-release))) + (import import-release))) From patchwork Sun Aug 28 13:18:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42037 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 B2FFD27BBEA; Sun, 28 Aug 2022 14:21:26 +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 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 CD14527BBE9 for ; Sun, 28 Aug 2022 14:21:25 +0100 (BST) Received: from localhost ([::1]:48458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIE9-0005Zu-0e for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICv-0002z2-Sk for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICv-0002g9-Jd for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICv-0006zD-Fc for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 15/20] refresh: Allow updating to a specific version (script) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:09 +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.166169278126688 (code B ref 57460); Sun, 28 Aug 2022 13:20:09 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:41 +0000 Received: from localhost ([127.0.0.1]:57804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICS-0006wG-S5 for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:41 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:57489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICH-0006un-O1 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:30 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M6URd-1oUDzx0YMz-006w7C for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:24 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 4E3C165A4A; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:41 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:vSysZ/IaTQn65cJm9u1e7IYJqjCu+VSqdIVVXOSsNCRRWPT8f3A pLyRoibU6Y+vSI5yalEBbSUSWOO/PLe+6TdZOJu09IOslQamB6CZAybGfYXqZ6Reet/GmiH WV7F/40iMHYrTEaUyvATMg5Zi6gs+YzOHTrbQwAdMH2GXrr1QnI5grhAyMEDtecS/7pK+NI ymA4LNRorf6PvhoKYAcPA== X-UI-Out-Filterresults: notjunk:1;V03:K0:BgrqSDvho7E=:LJGLuGO+kSezOu8jdjGxM4 E9P5jlPhsLAWkUiD7j4u75/RLqh+EBPtuMIYT0JX0baK79CvZlbsYPwPP8W4lsQvlfhEJSE2t JW9Fw9HhnqMd5nZ6FUpuXVU4MRz7pe3I71F2qF+MmAoTUs0xLkyvrkwfs9kqCLkHxq9MDWBBD Qb5CTA1s//Z4rF7I4O98vdLJS4YzR3ckAusDNiOCPHpWscnrO6IKY3Tle5ST5U835pIQOLlLE nVGJpjb9Yk9HmGw1CdO+Ht9sl+V7JG+xBbYhkBp1FiPXOQG0lGsCY5faqCV2XJg7pSXKvCsdk upm9OsSmP7O5rj2D4M38qzZHFSFXVmiN8LdKcaBBpdhsp9Hl0iPVq7qAcf4UHcU3PlJsQMWJ/ zVlZzRDBnuBvOyOKiIStwmbjsw8ERPPSmhypWhWym5bjZpQoyqaNNlpGx/9TPoZvFVmqCV6j8 7iWDAcCZJIAstHi1KvTrNiQGscvzGIlETgjK/8Ok03uogfzwUAxsabwrMUXgGAhj6JkwRdHHw qhhi0lfSPTUMzPML4ZnW1ltNW9cO8fnH7Ya9aBFPQ5Kn2/t5bqi8yUK88L8VUBFFupIrY7SXq 7ClN8p0GIwbB9YkgM4yZo5tsjXhsjJc9JOWrMBY1f28SMugJukz1Oy8dB8qmC2bmPOBv7iEJp IUt7PzdgEFsmevley5SzIy1bYkG8f1C1LlRzBafbnOby+NOKnjTYcBya1tTowd/UVawCvOME7 /IRMDlqvkVMLR4lEnvHdhIKPay6Grswkh+WK/7wtKFUOhEFw5/ZoTWjE4aU= 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 * guix/scripts/refresh.scm(options->packages)[args-packages]: Handle version specification in package name arguments. (update-package): Add keyword-argument 'version' and pass it on to called functions. (guix-refresh): When updating, pass the specified version (if any) to update-package. [package-list-without-versions, package-list-with-versions]: New functions. --- guix/scripts/refresh.scm | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 14329751f8..441e71a6e4 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Simon Tournier ;;; Copyright © 2021 Sarah Morgensen +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -224,7 +225,8 @@ update would trigger a complete rebuild." (('argument . spec) ;; Take either the specified version or the ;; latest one. - (specification->package spec)) + (let* ((name version (package-name->name+version spec))) + (list (specification->package name) version))) (('expression . exp) (read/eval-package-expression exp)) (_ #f)) @@ -298,7 +300,7 @@ update would trigger a complete rebuild." (G_ "no updater for ~a~%") (package-name package))) -(define* (update-package store package updaters +(define* (update-package store package version updaters #:key (key-download 'interactive) warn?) "Update the source file that defines PACKAGE with the new version. KEY-DOWNLOAD specifies a download policy for missing OpenPGP keys; allowed @@ -307,7 +309,7 @@ warn about packages that have no matching updater." (if (lookup-updater package updaters) (let ((version output source (package-update store package updaters - #:key-download key-download)) + #:key-download key-download #:version version)) (loc (or (package-field-location package 'version) (package-location package)))) (when version @@ -523,6 +525,18 @@ all are dependent packages: ~{~a~^ ~}~%") (lists (concatenate lists)))) + (define (package-list-without-versions packages) + (map (match-lambda + ((package version) package) + (package package)) + packages)) + + (define (package-list-with-versions packages) + (map (match-lambda + ((package version) (list package version)) + (package (list package #f))) + packages)) + (let* ((opts (parse-options)) (update? (assoc-ref opts 'update?)) (updaters (options->updaters opts)) @@ -540,12 +554,13 @@ all are dependent packages: ~{~a~^ ~}~%") (with-error-handling (with-store store (run-with-store store + (begin (mlet %store-monad ((packages (options->packages opts))) (cond (list-dependent? - (list-dependents packages)) + (list-dependents (package-list-without-versions packages))) (list-transitive? - (list-transitive packages)) + (list-transitive (package-list-without-versions packages))) (update? (parameterize ((%openpgp-key-server (or (assoc-ref opts 'key-server) @@ -558,13 +573,16 @@ all are dependent packages: ~{~a~^ ~}~%") (string-append (config-directory) "/upstream/trustedkeys.kbx")))) (for-each - (cut update-package store <> updaters - #:key-download key-download - #:warn? warn?) - packages) + (cut apply + (lambda (package version) + (update-package store package version updaters + #:key-download key-download + #:warn? warn?)) + <>) + (values (package-list-with-versions packages))) (return #t))) (else (for-each (cut check-for-package-update <> updaters #:warn? warn?) - packages) - (return #t))))))))) + (package-list-without-versions packages)) + (return #t)))))))))) From patchwork Sun Aug 28 13:18:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42040 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 A985327BBEA; Sun, 28 Aug 2022 14:21:34 +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 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 E394727BBE9 for ; Sun, 28 Aug 2022 14:21:33 +0100 (BST) Received: from localhost ([::1]:34688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIEH-000669-2y for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICw-0002zU-CY for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICw-0002gF-0H for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICv-0006zK-Se for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 16/20] refresh: Allow updating to a specific version (upstream) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:09 +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.166169278226699 (code B ref 57460); Sun, 28 Aug 2022 13:20:09 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:42 +0000 Received: from localhost ([127.0.0.1]:57806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICT-0006wP-C1 for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:41 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:44637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICK-0006uv-1e for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:32 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mzz6s-1pO7wG1tjS-00x6Yq for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:26 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 59DDA65A4C; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:42 +0200 Message-Id: <02bbc32e2c9955e4bcbe535c38cafba4bc6034bc.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:M2LKrxbOYco6sPdloA2CMg1+DDM3iE5CZ8EJ5f5Rc4z9GFrEuFE uMELBjLOKC82Vuj0GbxmbZvsnAhxN+Bq3SreVWKYxdO+2XGt6894NwfNunRo0V9jiAuLyJV WLiHD3LxtXaxKgGnl+CtiIv2y3Lz2+axaBPU0WsRHGjdZRziKy/AMlwRZWEzySeXdN+hwwd vTfaKgYwHehCk9WQFz14g== X-UI-Out-Filterresults: notjunk:1;V03:K0:PHLuffk9/RM=:cU+Rw+m+cmUpA8w2AJGaFb vF4sWN6z9k2AOnTGRAhIhFD+wjLxi8HfNAOERngZDQGtU5rCidgewa3TpiouUZ3KYef52ux73 aNySaluj2ezedErbR0XqkZ8nl46gTkuidxIcLp1wW/kf9DgWNtwH3U1AnGPgxVjFTRNE/ITXA zWnsown6M9kY3e2PN4nw6n3W7Do+4o3QhgW3Zllz7J4d44BetOXtePj2SH5aEdkK5a7t7mEXg 7NbPdKJu8h7NB6RFJ/ubjaoSBuZs1r7AaIyILc0XIB9olPfwG52cYhvv1iA6CCMDET2tEbkoK ezZL075zdkX1gccp2K3nXz+6C2KCMk0NqXe11z3qgcdyBykqyU1eAe+hjjj/d+BkBwzNTGIAV qkj3EDQPBAnEw/zmVlBwWI3O437EdEgmYUo2Z7mDt4G4JFZxqGNmS3N8GmGsHrbFveFty2YUx g7MT6LwUTT4e1+JdiEnRYSaouXCemKFtUjIXpr9nj0j6ao7HwaJcyRgGOT/lK5s55x37g2PGg sGqAPaq+98GrNbjCiOulGaBS1/S6N1WyY+Umy3IoKwnRrp2JDRkZ/JtrXwXuByiANtjfxt78R mX7KwdhehfImvEdokcaDROPN70VSWuvciZt6X2aepxruvtWA1Y0tgFL9rTOpWIsB2BnYQe6Qc KwNyVS2qK1/fAZRd83sRENsgihhwV/sihmV9uuA108vVs/qnVg8scpKPKV6dezJj9UXZNUON6 D18i79toPKcYV9HkZ5/gomLAToVLc7BJ7ZQ2yotkKdaLByhSjtpUFm5g8sU= 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 * guix/upstream.scm(package-latest-release): Add keyword-argument 'version' and pass it on to the updater's 'import' function. (package-update): add keyword-argument 'version' and pass it on to package-latest-release. Differentiate the error message issued when no package was found, depending on whether version was given or not. --- guix/upstream.scm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/guix/upstream.scm b/guix/upstream.scm index 6cee6440c3..faffb3347a 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019, 2022 Ricardo Wurmus ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021, 2022 Maxime Devos +;;; Copyright © 2022 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -277,7 +278,8 @@ them matches." (define* (package-latest-release package #:optional - (updaters (force %updaters))) + (updaters (force %updaters)) + #:key (version #f)) "Return an upstream source to update PACKAGE, a object, or #f if none of UPDATERS matches PACKAGE. When several updaters match PACKAGE, try them until one of them returns an upstream source. It is the caller's @@ -286,7 +288,7 @@ one." (any (match-lambda (($ name description pred import) (and (pred package) - (import package)))) + (import package #:version version)))) updaters)) (define* (package-latest-release* package @@ -490,13 +492,13 @@ SOURCE, an ." (define* (package-update store package #:optional (updaters (force %updaters)) - #:key (key-download 'interactive)) + #:key (key-download 'interactive) (version #f)) "Return the new version, the file name of the new version tarball, and input changes for PACKAGE; return #f (three values) when PACKAGE is up-to-date; raise an error when the updater could not determine available releases. KEY-DOWNLOAD specifies a download policy for missing OpenPGP keys; allowed values: 'always', 'never', and 'interactive' (default)." - (match (package-latest-release package updaters) + (match (package-latest-release package updaters #:version version) ((? upstream-source? source) (if (version>? (upstream-source-version source) (package-version package)) @@ -520,8 +522,11 @@ this method: ~s") (values #f #f #f))) (#f ;; Warn rather than abort so that other updates can still take place. - (warning (G_ "updater failed to determine available releases for ~a~%") - (package-name package)) + (if version + (warning (G_ "updater failed to find release ~a@~a~%") + (package-name package) version) + (warning (G_ "updater failed to determine available releases for ~a~%") + (package-name package))) (values #f #f #f)))) (define* (update-package-source package source hash) From patchwork Sun Aug 28 13:18:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42036 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 919CF27BBEC; Sun, 28 Aug 2022 14:21:26 +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 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 2070F27BBEA for ; Sun, 28 Aug 2022 14:21:26 +0100 (BST) Received: from localhost ([::1]:48460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIE9-0005de-AQ for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICx-00031c-KC for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICw-0002gK-Db for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICw-0006zS-9T for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 17/20] refresh: Allow updating to a specific version (documentation) Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:10 +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.166169278226707 (code B ref 57460); Sun, 28 Aug 2022 13:20:10 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:42 +0000 Received: from localhost ([127.0.0.1]:57808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICT-0006wa-Pm for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:42 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:52751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICM-0006v6-CW for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:34 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MIdW7-1ogIp33I4D-00EbFe for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:28 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 6753265A4E; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:43 +0200 Message-Id: <8e4201238e61596c397823bfac5f46d09498ccc8.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:aJdTP67ggUn6qQ0LODMfI34IPlYdIZx2q+ZJYfko+20DlC3sBkr MDVUGaxMRD0ckb3BBs5+0uPo/NOuu6YlYjJRvY3Jnyh7jQJuXRH2C7HqMO7/MgQjJam/J4h gWpDQyutLkEGYC2bSPb36H9b8VLJOuk6UVqjG9kKeKQyKz5vKKL/FPksPDIDkSF9fmpnuiO 4j8eUG09a0UQeID7hBUmg== X-UI-Out-Filterresults: notjunk:1;V03:K0:NjIjBc6aAMg=:LFCfCZBzIhBPs6EkG4gIY6 /dfj+3q1hkzaqkfwGBH9X9+XoYLBwgMxkiURoq1wPOCRzSKOn+Az+1CTM+CsCNvlAlns5aHOR flcpNKP50x6dCEYXAAKawBQxPPCJ4KTtn269L8s2k7Nhl79CorgKqVzlAEJkHF22xW97BneHE 77WZ94isl7ZKGfkP7Jq1oGNVEm7jgr5m7OHP54USjIteCdnHwQvujw7DW7Cl8REIZnTWQs82e 1IkoUQ8pGriCIDBI/79WcqCLrmIvNn0NuemPyTFmdR/tzd5aJJivlnEpEPfXi/ER6Ufytjm4u Ki9fAri4UNQVUw6VFWtUVEm2tMuP74M6UgTKCOhEsDfR8eFG4nWs8s2PE8WItxoMZujY+80T1 RBKoaGsf6CqSGvDfv0yTDdA0QaFk3EgMKCm9wlnxtDut58f+uP6sWeMPCpBObSvSVTtICSu/1 Bb7ZpHM53I4qi+Rnby0SvndpY13AF8IZJPKAUapIESXxf7kbLOLuCMbQnl/0rQklFl40Z3QGx wb0HExKt+bF3uMjP0/rSpofPCfZKSyM+oT+wHqovS5I8xwsT2FjHOQIluyZLFkqaMHWkslPLa /m5KqQ1d5tjn4Apov9wREsBZT7Wh9rRoYKK9lAJVIFiwQymBl9a4tsl1oxf57A41w/toOqTH0 SfXymxrF+3gOUkMR4+Xt52Z/JlHv2cmZRyxlncN/rIjW6QyN096ZMO8P6fRVKU60whUX94ryx NGUFD3l4HhbwGLXRsji1lIlfAp1jF96USu8DnX7592QKNo6QyuySArf3CsE= 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 --- doc/guix.texi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 7bce8a567c..c459fa6d4d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13747,6 +13747,19 @@ gnu/packages/multiprecision.scm:40:12: 6.1.2 is already the latest version of gm @end table +If for some reason you don't want to update to the latest version, +you can update to a specific version by passing a package specification. +However, not all updaters support this. + +@example +$ guix refresh trytond-party +gnu/packages/tryton.scm:2101:13: trytond-party would be upgraded from 6.2.0 to 6.4.0 +$ guix refresh -u trytond-party@@6.2.1 +@dots{} +gnu/packages/tryton.scm:2101:13: trytond-party: updating from version 6.2.0 to version 6.2.1... +@dots{} +@end example + Sometimes the upstream name differs from the package name used in Guix, and @command{guix refresh} needs a little help. Most updaters honor the @code{upstream-name} property in package definitions, which can be used From patchwork Sun Aug 28 13:18:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42029 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 DDA9927BBEA; Sun, 28 Aug 2022 14:20:45 +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 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 9F39527BBE9 for ; Sun, 28 Aug 2022 14:20:45 +0100 (BST) Received: from localhost ([::1]:44408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIDU-0003co-Q2 for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:20:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICx-00031b-KM for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICw-0002gL-QZ for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICw-0006zZ-MQ for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 18/20] TEMP REMOVE import: git: Restrict to non-github origins. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:10 +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.166169278226718 (code B ref 57460); Sun, 28 Aug 2022 13:20:10 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:42 +0000 Received: from localhost ([127.0.0.1]:57811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICU-0006wh-7d for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:42 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:37129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICO-0006vE-Mu for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:37 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MowOm-1pD9bR0R9a-00qPVs for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:31 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 7CDF165A51; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:44 +0200 Message-Id: <0ba96b5f2dfd841ab080e7a3373b6e335b62fd59.1661691695.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:rVVo9ueOse79GRLoxLty0n9N6BgCrfShj4PKHHxUrfuZrTB3lox ZVzhsep3ZyHPFs9oRdYbExakMkr/kyRNE3HorWRwZQee5Uy7z9Trt0esFP4So1tppaUDhQ/ qcAvIv4QlRroUQXzj5e3iFK4lFye8bfa3qQunuciHeOgy26VNZeqwoevKwmpAAkW3TwOPe0 k0Yg/2SeOutcX3se7L/Tg== X-UI-Out-Filterresults: notjunk:1;V03:K0:zNEzmST/HZ4=:lKJ9leXPCEU+iVFyTaUJi7 Qroo03Vwc1NazI+zqXQNGXUIsGxZFy/V78miS6CJKC4g/Md7lcqx6wU5IDFEyREGxHBxBpM9m ota2jjXdY3v6a5KCg4IrkEJmx1cuSMIUhxRNPkoHHMVtXt/j13/Aaekb5jT5JOGqI8XQ4lPXL 3vViD3pg1rCgkyuzd1HbhX2zteMFgaqKOybRU1IN0vh5tK0T4CXHjiSGBz549mPMAIVy5THkJ 55WvQlTIXfRCTwQ5xAgAuUaMnNrjE3p6kZjByaMOKozkPKTjN7YTonIEj0I2UswpWkQ32xtek JOLUobPC4mG5zR5BojolTPuK2FA/P5EOYMUb+m36Cm3+urA/RVIyxUkA+FRjItnZj1t7z5lqn tbTZnupW6IG1Q1yuUSXGzukJmau7I9uEm3j192HDzHWggXHY2pJOOlTfqWguXBr7k1BzIc9ne vYNLbOsW3DZx4qnsdmEkdKWSFKcjyWMk6V+YS52MovxJD6mdEP5glBBDQK4fGWMtKcLONEiWe VMqNOV9KeVo2cj00ehDONm4LL5HZvaEJYEc3x/6zw+YMAvwFXdkAXaJ3LC9ukIk1fdxpFP5gk FpH9m2ljGl7wiOmI6mLFkYqruDRDa9/uNS4BRkXwK986zt465ZV0/RLrJmSJhZvCozaMo3bEf wpvvlJk6DfRsPH1mijfguEn23KPMynAgDuewv+PudYT4bQKT+CtyLly6vOpJ2P08X8CMDT3Sz 5pYnazBfuIeRiZQeNRoUGv7Q2CD8iYuQkvkjF9ERKE+EHwIUkwAgr9vZmY0= 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 This commit will be dropped and not be committed to the main branch! 'guix refresh -t generic-git' reported a lot of packages which are hosted at github and are already handled by the github updater. So whether the package is updates using the github updater or the generic-git updater would be non-deterministic. And indeed 'guix refresh --list-updaters' without this change reported 31.2% for the github updater and 34.9% for the generic-git updater. With this patch, it's only 3.7% for the generic-git updater. (Still the sum of the percent-values is 112%, anyhow better then the 146% prior to this change.) Beside these statistical issues, this patch has another effect: If the github updater fails to pick a (later) version the generic-git updater was triggered. Anyhow: Why should the generic-git updater be able to find a (later) version, if the github updater did not? * guix/import/github.scm: Export 'github-package?'. * guix/import/git.scm(git-package?): Also check for not github-package?. --- guix/import/git.scm | 4 +++- guix/import/github.scm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/import/git.scm b/guix/import/git.scm index fdac51edfd..02a851655d 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm @@ -25,6 +25,7 @@ #:use-module (guix git) #:use-module (guix git-download) #:use-module (guix i18n) + #:use-module ((guix import github) #:select (github-package?)) #:use-module (guix packages) #:use-module (guix upstream) #:use-module (guix utils) @@ -213,7 +214,8 @@ tag, or #false and #false if the latest version could not be determined." (match (package-source package) ((? origin? origin) (and (eq? (origin-method origin) git-fetch) - (git-reference? (origin-uri origin)))) + (git-reference? (origin-uri origin)) + (not (github-package? package)))) (_ #f))) (define* (import-git-release package #:key (version #f)) diff --git a/guix/import/github.scm b/guix/import/github.scm index facdc96e24..01aa23ba15 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -42,7 +42,7 @@ #:use-module (guix http-client) #:use-module (web uri) #:use-module (web response) - #:export (%github-api %github-updater)) + #:export (%github-api %github-updater github-package?)) ;; For tests. (define %github-api (make-parameter "https://api.github.com")) From patchwork Sun Aug 28 13:18:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42039 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 8BF9127BBEB; Sun, 28 Aug 2022 14:21:34 +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 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 3D13427BBEA for ; Sun, 28 Aug 2022 14:21:34 +0100 (BST) Received: from localhost ([::1]:34690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIEH-00066k-By for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSICx-00031q-Lk for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSICx-0002gN-4u for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSICx-0006zh-1S for guix-patches@gnu.org; Sun, 28 Aug 2022 09:20:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 19/20] TEMP REMOVE upstream: Output names of importers tried. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:20:11 +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.166169278326725 (code B ref 57460); Sun, 28 Aug 2022 13:20:11 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:19:43 +0000 Received: from localhost ([127.0.0.1]:57813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICU-0006wy-Qn for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:43 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:40139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICR-0006vO-0T for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:39 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N5VXu-1pTZzb1kss-016wqt for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:33 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 8571565A54; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:45 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:T+1Kj1xO4mXESLjmmKtHnGCsKH0UeS3t+DIi1Y6pYxHETXoNMF9 wBc3wIDuN0u/CwYF8Z1V7R5kAmgb1SwI278qXAx2OVV5RM+rJjOhgUx00pQnxP+oaDAfIfe C9zFZbWk1oI4sDrYSQ4CIZs7aOmvAyvyDcp03ztmD7n04FoD8+U+1XNOolKE6AZQcv3II0Z 8wZgBgqju3Xxepb+Wui2Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:I+myAcIWwMs=:O4c7B7c2Ew/Sb1nhunzvcP Aq5W9maAlJ0tpAeXNlayqSF2szBylk9Nr40fmeP0iZ+b+8OHhf2Lri+AouYwVtwX7c6DwUzkF a7b00dc3W1r8kn+ijMSsVA23nWnrRiTbpwDUz9yY8tpuKmj5BRT0JWEVirCfpSbGurtUlTWDl oYXjHGniAZS5bYBnoqsYl1S3lx8i582Lp+X7b+6q2jsEgBgmRBbS6EZOhEwqqikJEX6wj9PDJ UpHWJH+hsyDGjC87wj6qxict4qvI0xQliXJ1qsZN8dymsfnv2Rn8UYcF0aVBet74XkwB6AN2h L5ZAWdcGbyiZuYCsOaKAUbbJQ0ZPxudSZLLNOZEUfg0PQmxnSlSImL5rAjnwWGr+P+sX7yPfF NSNr1RRROVSvqQpdLRmD0YOONpDyBGlv5LNaOFmKY4cVTvKZiTkIpMxCMhuYyDTBqW7UaPE2t Boj7KxZj1KLPwzphY3NPJqnnVtuYUjRJ/B9u9V6ayJM/0WYrWR0NQYj6uwjJ4uNNF4TaNs8Ns NQTpHQv1RUstvb5FrWsgNP050E0GDAgTwTCErWdsRY6yZfjN7+Lsi83pAR7uMLT+RvbdN0l5p GIRAT4qV3aW/g/wxXmR1ACL/1KyNeYz9shmvDsowN5SxWMsczpvTgIEivdeB5ZkP/6I2u7uHX I6a1NzTrOe9TFWB+vWZ7QDseoXWJSGhczbxqkDOkVMfz8UxR5/6yVyjzjEs3GJlzjzhYagy1e iFhR1N3ZTnjnzlyBJ0IA4lWUtMUmudt1pjbtLmNSLLcKtPqwDHup1j5IsHg= 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 This commit will be dropped and not be committed to the main branch! --- guix/upstream.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/guix/upstream.scm b/guix/upstream.scm index faffb3347a..4a6b37bbf2 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -288,6 +288,7 @@ one." (any (match-lambda (($ name description pred import) (and (pred package) + (display (string-append "trying importer " (symbol->string name) "\n")) (import package #:version version)))) updaters)) From patchwork Sun Aug 28 13:18:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 42038 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 7CBDA27BBEA; Sun, 28 Aug 2022 14:21:28 +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 EBA6027BBE9 for ; Sun, 28 Aug 2022 14:21:27 +0100 (BST) Received: from localhost ([::1]:48462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSIEB-0005kh-2t for patchwork@mira.cbaines.net; Sun, 28 Aug 2022 09:21:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSIDm-00055R-WF for guix-patches@gnu.org; Sun, 28 Aug 2022 09:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSIDm-0002rB-N4 for guix-patches@gnu.org; Sun, 28 Aug 2022 09:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSIDm-00071o-ID for guix-patches@gnu.org; Sun, 28 Aug 2022 09:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57460] [PATCH 20/20] TEMP REMOVE Add test-script for refesh-with-version Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Aug 2022 13:21:02 +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.166169282026927 (code B ref 57460); Sun, 28 Aug 2022 13:21:02 +0000 Received: (at 57460) by debbugs.gnu.org; 28 Aug 2022 13:20:20 +0000 Received: from localhost ([127.0.0.1]:57833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSID6-00070E-3n for submit@debbugs.gnu.org; Sun, 28 Aug 2022 09:20:20 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:51091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSICT-0006vW-K2 for 57460@debbugs.gnu.org; Sun, 28 Aug 2022 09:19:42 -0400 Received: from hermia.goebel-consult.de ([46.87.137.46]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M1aQN-1oPFvX06jD-0039Hq for <57460@debbugs.gnu.org>; Sun, 28 Aug 2022 15:19:36 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 9918965A57; Sun, 28 Aug 2022 15:18:56 +0200 (CEST) From: Hartmut Goebel Date: Sun, 28 Aug 2022 15:18:46 +0200 Message-Id: <62dad0b7bef5982202eb8c512e15271355e0db86.1661691695.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:xV2OJ6mk7B/9PSC6/VyKutPwRhUbarPh+hcucVm+cjMPnnVkMX3 uI2FuPAISqtV4rlLAQiopUK07lRwElzPeK3fvv9jOyZdwlID/80Qfqvr7Whc4v15sbVWL10 clpQzyaNw3wTG1ALIprI7TFFTo0lQ3NIs1qjPGDHJ8qLxbws9qflUmgR2NHMsdxZJnV6Uta BaoOnxKQTLRBZc2keJfZQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ghyOvxdCUCk=:NqSfoa8sR9vNKQw9xMSf+e I49w7ks8eS5wIbJdgnm1fgYqvC4Wj9LMVWfjYpOQTnw5LBQgYgP88iS7UUDez/k4ZhCKoltw1 tLlxOOsLs5rmFC/2NYmTMWb9TbbQugmjHuK7HFctwwHnfqQZR+Z+JtLgC0d+mt+mB/6B8MV3d JzzmmnGMQpqKBMqbe3E8U9eZrJRrzWCZkEKKeyersImB8F++RoQNs9PrwPYe/TD12ruKPXt59 7CQ7IEz7vBwWe8GOtA6Y7is42ItcT6HqaYwTavRjN2cHvhXzF7Z+bxpjsJaBYVVL13M9p/s/E NAjKzeg7McRpEUZ3Jfj1BeIIhXrEHKOgqMjZBQZos2uArRXbSw32AL/ZFaDArwjDv/ZfDUnEc v14VA57I5F8AiLkIn3+Y8kDf6PH3DqjJzSA9UDOANUkUYqHWxdfSew+CUfCi/r2DqqZrvdsHC seyWAWChLh7pqQFiBVexCV6IWq/17GsGxTZERdzsg3GVTP6HATBAZz+0fgKGIrXzm7EL10dSl Ie0FT94rwmeA5hji3V4VefL9PI177uVY436MY71vafaO1H0tmxFajV2SzCYN1CKlqOq8ihpGw Ig8t5uHqFAaL53ER4arMcMN2WEd9hiYVwb3hIUP1Hikx2BXGs4fRkeslezt9DHwHH5NNfkOpL 5Hh+4ixoTbitQfb8qDDupY+h6AEcLvZ2D+MVSrxb5C+e1sUDvj+UeQpmYELJIEyCUe0vy8MmB ENZQLCSZbLKxBPT2tVPqw0QpRxh2r8w8XEmBjXAMmEVHatxR5YcGIGXdVOs= 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 This commit will be dropped and not be committed to the main branch! --- test-import-with-version.sh | 98 +++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 test-import-with-version.sh diff --git a/test-import-with-version.sh b/test-import-with-version.sh new file mode 100644 index 0000000000..3aa09dda68 --- /dev/null +++ b/test-import-with-version.sh @@ -0,0 +1,98 @@ +echo -n "Number of importers: " +ls guix/import/*.scm | wc -l + +echo -n "Number of updaters : " +grep upstream-updater guix/import/*.scm | wc -l + +echo + +PKGS=() +# chicken see below +PKGS+=("crate rust-sequoia-openpgp@1.7.0") +PKGS+=("generic-git remmina@1.4.25") # (import/git) +PKGS+=("generic-html xclock@1.1.0") # (gnu-maintenance) +PKGS+=("github libwacom@1.12") # +PKGS+=("gnome gtranslator@41.0") +PKGS+=("gnu help2man@1.49.1") # (gnu-maintenance) +PKGS+=("gnu-ftp libgpg-error@1.43") # (gnu-maintenance) +# hexpm see below +PKGS+=("kde plasma-framework@5.96.0") +PKGS+=("kernel.org iw@5.3") # (gnu-maintenance) = html +PKGS+=("launchpad soundconverter@4.0.0") # will fail due to changed archive filename +PKGS+=("pypi trytond-party@6.4.0") +PKGS+=("savannah libpipeline@1.5.4") # (gnu-maintenance) = html +PKGS+=("xorg libxi@1.7.99.2") # (gnu-maintenance) = ftp + + +for pkg in "${PKGS[@]}" ; do + echo "------------------------------------------" $pkg + pkg=${pkg//* } + nv=${pkg%@*} + ./pre-inst-env guix refresh $nv + ./pre-inst-env guix refresh -u $pkg + make make-go 2> /dev/null # avoid "source file newer" messages +done + +echo +echo +echo +echo "==============================================" +echo 'For these packages there is no newer version between the current one in guix' +echo 'and the later one available upstream. Thus we need to "downgrade" the' +echo 'version first. And to show that I specific version will be fetched, we' +echo '"refresh" to an older version.' +echo "---------------------------------------------" +echo + +PKGS=() +PKGS+=("egg chicken-srfi-13@0.3") +PKGS+=("hexpm erlang-relx@4.5.0") +# HACK +sed -i -e s/"0\.3\.2"/"0.0.0"/ gnu/packages/chicken.scm +sed -i -e s/"4\.6\.0"/"0.0.0"/ gnu/packages/erlang.scm +make make-go 2> /dev/null # avoid "source file newer" messages + +for pkg in "${PKGS[@]}" ; do + echo "---------------------------------------------" $pkg + pkg=${pkg//* } + nv=${pkg%@*} + ./pre-inst-env guix refresh -u $pkg + ./pre-inst-env guix refresh $nv + make make-go 2> /dev/null # avoid "source file newer" messages +done + +function try_fail () { + pkg=$1 ; shift + repo=$1 ; shift + echo "---------------------------------------------" $repo $pkg + echo -- " shall fail since" $repo $1 + ./pre-inst-env guix refresh -u $pkg + echo +} + +echo +echo +echo "==============================================" +echo 'These updates issue an error when trying to update to a specific version:' +try_fail r-tximeta@1.5.4 'bioconductor (cran.scm)' 'repo supports latest version only' +try_fail r-sungeo@0.2.290 'cran' 'repo supports latest version only' +try_fail perl-socket-msghdr@0.10 'cpan' 'importer does not support version' +try_fail emacs-vertico-posframe@0.5.9 'elpa' 'importer does not support version' +try_fail ruby-commander@4.5.0 'gem' 'importer does not support version' +try_fail ghc-singleton-bool@0.2.3 'hackage' 'importer does not support version' +try_fail minetest-advtrains@2.5.0 'minetest' 'importer does not support version' +try_fail ocaml-cudf@0.11 'opam' 'importer does not support version' +try_fail xplanet@1.4.0 'sourceforge (gnu-maintenance)' 'to complicated to implement' + +echo +echo +echo "==============================================" +echo 'These importers do not have an updater:' +echo -- ' - json -- n/a' +echo -- ' - elm -- has no updater and "elm-package-origin" sources are hosted at github' +# try_fail elm-http@2.0.0 elm 'has no updater' +try_fail texlive-sourcecodepro@60101 'texlive' 'has no updater' +echo +echo "==============================================" +echo 'For these importers the updater is not yet implemented:' +echo -- ' - stackage --- unclear how to handle LTS version'