me
/
guix
Archived
1
0
Fork 0

upstream-updater: Rename record field.

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.
master
Hartmut Goebel 2022-08-27 13:05:33 +02:00
parent c50cd1bbec
commit a274a6a1ac
No known key found for this signature in database
GPG Key ID: 634A8DFFD3F631DF
21 changed files with 35 additions and 35 deletions

View File

@ -848,7 +848,7 @@ the directory containing its source tarball."
(name 'gnu) (name 'gnu)
(description "Updater for GNU packages") (description "Updater for GNU packages")
(pred gnu-hosted?) (pred gnu-hosted?)
(latest latest-gnu-release))) (import latest-gnu-release)))
(define %gnu-ftp-updater (define %gnu-ftp-updater
;; This is for GNU packages taken from alternate locations, such as ;; This is for GNU packages taken from alternate locations, such as
@ -859,41 +859,41 @@ the directory containing its source tarball."
(pred (lambda (package) (pred (lambda (package)
(and (not (gnu-hosted? package)) (and (not (gnu-hosted? package))
(pure-gnu-package? package)))) (pure-gnu-package? package))))
(latest latest-release*))) (import latest-release*)))
(define %savannah-updater (define %savannah-updater
(upstream-updater (upstream-updater
(name 'savannah) (name 'savannah)
(description "Updater for packages hosted on savannah.gnu.org") (description "Updater for packages hosted on savannah.gnu.org")
(pred (url-prefix-predicate "mirror://savannah/")) (pred (url-prefix-predicate "mirror://savannah/"))
(latest latest-savannah-release))) (import latest-savannah-release)))
(define %sourceforge-updater (define %sourceforge-updater
(upstream-updater (upstream-updater
(name 'sourceforge) (name 'sourceforge)
(description "Updater for packages hosted on sourceforge.net") (description "Updater for packages hosted on sourceforge.net")
(pred (url-prefix-predicate "mirror://sourceforge/")) (pred (url-prefix-predicate "mirror://sourceforge/"))
(latest latest-sourceforge-release))) (import latest-sourceforge-release)))
(define %xorg-updater (define %xorg-updater
(upstream-updater (upstream-updater
(name 'xorg) (name 'xorg)
(description "Updater for X.org packages") (description "Updater for X.org packages")
(pred (url-prefix-predicate "mirror://xorg/")) (pred (url-prefix-predicate "mirror://xorg/"))
(latest latest-xorg-release))) (import latest-xorg-release)))
(define %kernel.org-updater (define %kernel.org-updater
(upstream-updater (upstream-updater
(name 'kernel.org) (name 'kernel.org)
(description "Updater for packages hosted on kernel.org") (description "Updater for packages hosted on kernel.org")
(pred (url-prefix-predicate "mirror://kernel.org/")) (pred (url-prefix-predicate "mirror://kernel.org/"))
(latest latest-kernel.org-release))) (import latest-kernel.org-release)))
(define %generic-html-updater (define %generic-html-updater
(upstream-updater (upstream-updater
(name 'generic-html) (name 'generic-html)
(description "Updater that crawls HTML pages.") (description "Updater that crawls HTML pages.")
(pred html-updatable-package?) (pred html-updatable-package?)
(latest latest-html-updatable-release))) (import latest-html-updatable-release)))
;;; gnu-maintenance.scm ends here ;;; gnu-maintenance.scm ends here

View File

@ -358,4 +358,4 @@ in RELEASE, a <cpan-release> record."
(name 'cpan) (name 'cpan)
(description "Updater for CPAN packages") (description "Updater for CPAN packages")
(pred cpan-package?) (pred cpan-package?)
(latest latest-release))) (import latest-release)))

View File

@ -776,13 +776,13 @@ s-expression corresponding to that package, or #f on failure."
(name 'cran) (name 'cran)
(description "Updater for CRAN packages") (description "Updater for CRAN packages")
(pred cran-package?) (pred cran-package?)
(latest latest-cran-release))) (import latest-cran-release)))
(define %bioconductor-updater (define %bioconductor-updater
(upstream-updater (upstream-updater
(name 'bioconductor) (name 'bioconductor)
(description "Updater for Bioconductor packages") (description "Updater for Bioconductor packages")
(pred bioconductor-package?) (pred bioconductor-package?)
(latest latest-bioconductor-release))) (import latest-bioconductor-release)))
;;; cran.scm ends here ;;; cran.scm ends here

View File

@ -370,5 +370,5 @@ look up the development dependencs for the given crate."
(name 'crate) (name 'crate)
(description "Updater for crates.io packages") (description "Updater for crates.io packages")
(pred crate-package?) (pred crate-package?)
(latest latest-release))) (import latest-release)))

View File

@ -348,6 +348,6 @@ not work."
(name 'egg) (name 'egg)
(description "Updater for CHICKEN egg packages") (description "Updater for CHICKEN egg packages")
(pred egg-package?) (pred egg-package?)
(latest latest-release))) (import latest-release)))
;;; egg.scm ends here ;;; egg.scm ends here

View File

@ -444,7 +444,7 @@ type '<elpa-package>'."
(name 'elpa) (name 'elpa)
(description "Updater for ELPA packages") (description "Updater for ELPA packages")
(pred package-from-elpa-repository?) (pred package-from-elpa-repository?)
(latest latest-release))) (import latest-release)))
(define elpa-guix-name (cut guix-name "emacs-" <>)) (define elpa-guix-name (cut guix-name "emacs-" <>))

View File

@ -189,7 +189,7 @@ package on RubyGems."
(name 'gem) (name 'gem)
(description "Updater for RubyGem packages") (description "Updater for RubyGem packages")
(pred gem-package?) (pred gem-package?)
(latest latest-release))) (import latest-release)))
(define* (gem-recursive-import package-name #:optional version) (define* (gem-recursive-import package-name #:optional version)
(recursive-import package-name (recursive-import package-name

View File

@ -226,4 +226,4 @@ tag, or #false and #false if the latest version could not be determined."
(name 'generic-git) (name 'generic-git)
(description "Updater for packages hosted on Git repositories") (description "Updater for packages hosted on Git repositories")
(pred git-package?) (pred git-package?)
(latest latest-git-release))) (import latest-git-release)))

View File

@ -330,6 +330,6 @@ releases."
(name 'github) (name 'github)
(description "Updater for GitHub packages") (description "Updater for GitHub packages")
(pred github-package?) (pred github-package?)
(latest latest-release))) (import latest-release)))

View File

@ -130,4 +130,4 @@ https://discourse.gnome.org/t/new-gnome-versioning-scheme/4235"
(name 'gnome) (name 'gnome)
(description "Updater for GNOME packages") (description "Updater for GNOME packages")
(pred (url-prefix-predicate "mirror://gnome/")) (pred (url-prefix-predicate "mirror://gnome/"))
(latest latest-gnome-release))) (import latest-gnome-release)))

View File

@ -381,6 +381,6 @@ respectively."
(name 'hackage) (name 'hackage)
(description "Updater for Hackage packages") (description "Updater for Hackage packages")
(pred hackage-package?) (pred hackage-package?)
(latest latest-release))) (import latest-release)))
;;; cabal.scm ends here ;;; cabal.scm ends here

View File

@ -344,4 +344,4 @@ latest version of PACKAGE-NAME."
(name 'hexpm) (name 'hexpm)
(description "Updater for hex.pm packages") (description "Updater for hex.pm packages")
(pred (url-prefix-predicate hexpm-package-url)) (pred (url-prefix-predicate hexpm-package-url))
(latest latest-release))) (import latest-release)))

View File

@ -187,4 +187,4 @@ not be determined."
(name 'kde) (name 'kde)
(description "Updater for KDE packages") (description "Updater for KDE packages")
(pred (url-prefix-predicate "mirror://kde/")) (pred (url-prefix-predicate "mirror://kde/"))
(latest latest-kde-release))) (import latest-kde-release)))

View File

@ -145,4 +145,4 @@ for example, 'linuxdcpp'. Return #f if there is no releases."
(name 'launchpad) (name 'launchpad)
(description "Updater for Launchpad packages") (description "Updater for Launchpad packages")
(pred launchpad-package?) (pred launchpad-package?)
(latest latest-release))) (import latest-release)))

View File

@ -513,4 +513,4 @@ or #false if the latest release couldn't be determined."
(name 'minetest) (name 'minetest)
(description "Updater for Minetest packages on ContentDB") (description "Updater for Minetest packages on ContentDB")
(pred minetest-package?) (pred minetest-package?)
(latest latest-minetest-release))) (import latest-minetest-release)))

View File

@ -435,4 +435,4 @@ package in OPAM."
(name 'opam) (name 'opam)
(description "Updater for OPAM packages") (description "Updater for OPAM packages")
(pred opam-package?) (pred opam-package?)
(latest latest-release))) (import latest-release)))

View File

@ -583,4 +583,4 @@ source. To build it from source, refer to the upstream repository at
(name 'pypi) (name 'pypi)
(description "Updater for PyPI packages") (description "Updater for PyPI packages")
(pred pypi-package?) (pred pypi-package?)
(latest latest-release))) (import latest-release)))

View File

@ -175,6 +175,6 @@ PACKAGE or #f if the package is not included in the Stackage LTS release."
(name 'stackage) (name 'stackage)
(description "Updater for Stackage LTS packages") (description "Updater for Stackage LTS packages")
(pred stackage-lts-package?) (pred stackage-lts-package?)
(latest latest-lts-release))) (import latest-lts-release)))
;;; stackage.scm ends here ;;; stackage.scm ends here

View File

@ -66,7 +66,7 @@
upstream-updater-name upstream-updater-name
upstream-updater-description upstream-updater-description
upstream-updater-predicate upstream-updater-predicate
upstream-updater-latest upstream-updater-import
upstream-input-change? upstream-input-change?
upstream-input-change-name upstream-input-change-name
@ -241,7 +241,7 @@ correspond to the same version."
(name upstream-updater-name) (name upstream-updater-name)
(description upstream-updater-description) (description upstream-updater-description)
(pred upstream-updater-predicate) (pred upstream-updater-predicate)
(latest upstream-updater-latest)) (import upstream-updater-import))
(define (importer-modules) (define (importer-modules)
"Return the list of importer modules." "Return the list of importer modules."
@ -272,7 +272,7 @@ correspond to the same version."
"Return an updater among UPDATERS that matches PACKAGE, or #f if none of "Return an updater among UPDATERS that matches PACKAGE, or #f if none of
them matches." them matches."
(find (match-lambda (find (match-lambda
(($ <upstream-updater> name description pred latest) (($ <upstream-updater> name description pred import)
(pred package))) (pred package)))
updaters)) updaters))
@ -285,9 +285,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 responsibility to ensure that the returned source is newer than the current
one." one."
(any (match-lambda (any (match-lambda
(($ <upstream-updater> name description pred latest) (($ <upstream-updater> name description pred import)
(and (pred package) (and (pred package)
(latest package)))) (import package))))
updaters)) updaters))
(define* (package-latest-release* package (define* (package-latest-release* package

View File

@ -92,7 +92,7 @@
(define* (found-sexp old-version old-commit tags releases) (define* (found-sexp old-version old-commit tags releases)
(and=> (and=>
(call-with-releases (lambda () (call-with-releases (lambda ()
((upstream-updater-latest %github-updater) ((upstream-updater-import %github-updater)
(example-package old-version old-commit))) (example-package old-version old-commit)))
tags releases) tags releases)
upstream-source->sexp)) upstream-source->sexp))

View File

@ -488,7 +488,7 @@
(name 'dummy) (name 'dummy)
(pred (const #t)) (pred (const #t))
(description "") (description "")
(latest (const (upstream-source (import (const (upstream-source
(package "foo") (package "foo")
(version "42.0") (version "42.0")
(urls '("http://example.org"))))))))) (urls '("http://example.org")))))))))