all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 57460@debbugs.gnu.org
Subject: [bug#57460] [PATCH 01/20] upstream-updater: Rename record field.
Date: Sun, 28 Aug 2022 15:18:27 +0200	[thread overview]
Message-ID: <27f47be66e4656d8b97c3c6169dd04897fc68dbc.1661691694.git.h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <cover.1661691694.git.h.goebel@crazy-compilers.com>

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 <cpan-release> 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 '<elpa-package>'."
    (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
-          (($ <upstream-updater> name description pred latest)
+          (($ <upstream-updater> 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
-         (($ <upstream-updater> name description pred latest)
+         (($ <upstream-updater> 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")))))
-- 
2.30.4





  reply	other threads:[~2022-08-28 13:19 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-28 13:15 [bug#57460] [PATCH 00/19] Refresh to specific version Hartmut Goebel
2022-08-28 13:18 ` Hartmut Goebel [this message]
2022-08-28 13:18 ` [bug#57460] [PATCH 02/20] import: cpan: Remove unused exports Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 03/20] updaters: Issue error-message if version is given: Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 04/20] import: sourceforge: Issue error-message if version is given Hartmut Goebel
2022-08-28 13:22   ` Maxime Devos
2022-08-28 13:18 ` [bug#57460] [PATCH 05/20] refresh: Allow updating to a specific version (gnu-maintenance) Hartmut Goebel
2022-09-24  9:17   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 06/20] refresh: Allow updating to a specific version (crate) Hartmut Goebel
2022-09-24  9:19   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 07/20] refresh: Allow updating to a specific version (egg) Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 08/20] refresh: Allow updating to a specific version (git) Hartmut Goebel
2022-09-24  9:24   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 09/20] refresh: Allow updating to a specific version (github) Hartmut Goebel
2022-09-24  9:26   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 10/20] refresh: Allow updating to a specific version (gnome) Hartmut Goebel
2022-09-24  9:29   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-09-24 10:25     ` Maxime Devos
2022-09-24 16:31       ` Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 11/20] refresh: Allow updating to a specific version (hexpm) Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 12/20] refresh: Allow updating to a specific version (kde) Hartmut Goebel
2022-09-24  9:34   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 13/20] refresh: Allow updating to a specific version (launchpad) Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 14/20] refresh: Allow updating to a specific version (pypi) Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 15/20] refresh: Allow updating to a specific version (script) Hartmut Goebel
2022-08-28 13:26   ` Maxime Devos
2022-09-24  9:45   ` [bug#57460] [PATCH 00/19] Refresh to specific version Ludovic Courtès
2022-11-01 15:58     ` Hartmut Goebel
2022-11-22  7:33       ` Ludovic Courtès
2022-08-28 13:18 ` [bug#57460] [PATCH 16/20] refresh: Allow updating to a specific version (upstream) Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 17/20] refresh: Allow updating to a specific version (documentation) Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 18/20] TEMP REMOVE import: git: Restrict to non-github origins Hartmut Goebel
2022-08-28 17:26   ` Liliana Marie Prikler
2022-08-28 13:18 ` [bug#57460] [PATCH 19/20] TEMP REMOVE upstream: Output names of importers tried Hartmut Goebel
2022-08-28 13:18 ` [bug#57460] [PATCH 20/20] TEMP REMOVE Add test-script for refesh-with-version Hartmut Goebel
2022-08-28 13:30 ` [bug#57460] [PATCH 00/19] Refresh to specific version Maxime Devos
2022-09-24  9:48   ` Ludovic Courtès
2022-11-01 16:02     ` Hartmut Goebel
2022-12-20  9:34 ` [bug#57460] [PATCH v3 00/18] " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 01/18] upstream-updater: Rename record field Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 02/18] import: cpan: Remove unused exports Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 03/18] import: Issue error-message if version is given Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 04/18] import: sourceforge: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 05/18] gnu-maintenance: Allow updating to a specific version Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 06/18] import: crate: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 07/18] import: egg: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 08/18] import: gem: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 09/18] import: git: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 10/18] import: github: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 11/18] import: gnome: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 12/18] import: hexpm: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 13/18] import: kde: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 14/18] import: launchpad: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 15/18] import: pypi: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 16/18] refresh: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 17/18] upstream: " Hartmut Goebel
2022-12-20  9:34   ` [bug#57460] [PATCH v3 18/18] doc: Describe how to update " Hartmut Goebel
2022-12-23 22:42     ` [bug#57460] [PATCH 00/19] Refresh to " Ludovic Courtès
2022-12-23 22:45   ` Ludovic Courtès
2022-12-26 16:42     ` bug#57460: " Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27f47be66e4656d8b97c3c6169dd04897fc68dbc.1661691694.git.h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=57460@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.