Previously, something like "guix refresh texmacs" would report "no
updater". Now, it reports that the 'gnu-ftp' updater failed to list
releases.
* guix/upstream.scm (lookup-updater): Use 'find' instead of 'any' to
return the <upstream-updater>.
(package-latest-release): Adjust accordingly.
* guix/scripts/refresh.scm (check-for-package-update): When
'package-latest-release' returns #f, distinguish between "no updater"
and "failing updater".
Previously, if the currently used archive type (e.g., "bz2") was
unavailable for the new version, 'guix refresh -u' would crash instead
of updating to the archive with the new type.
* guix/upstream.scm (package-update/url-fetch): When URL is #f, pick the
first of URLS; likewise for SIGNATURE-URL.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>
in <https://bugs.gnu.org/35010>.
* guix/upstream.scm (update-package-source): Take 'source' instead of
'version' as the second argument.
[update-expression]: Change to take 'replacements', a list of
replacement pairs.
Compute OLD-URL and NEW-URL and replace the dirname of the OLD-URL with
that of NEW-URL.
* guix/scripts/refresh.scm (update-package): Adjust call to
'update-package-source' accordingly.
Fixes a regression introduced in
abd4d6b33d, where CHANGES would no longer
be a thunk.
Reported by Ricardo Wurmus.
* guix/upstream.scm (package-update/url-fetch): Return SOURCE as the
third value instead of CHANGES.
* guix/scripts/refresh.scm (update-package): Adjust accordingly.
Fixes <https://bugs.gnu.org/34778>.
Reported by Gábor Boskovits <boskovits@gmail.com>.
* guix/upstream.scm (package-update/url-fetch): New procedure, with code
formerly in 'package-update'.
(%method-updates): New variable.
(package-update): Check the method to download PACKAGE's source, and
look up a corresponding update method in %METHOD-UPDATES, and raise an
error if none was found.
This reduces the closure of (guix discovery) from 28 to 8 modules.
* guix/discovery.scm (scheme-files): Use 'format' instead of 'warning'.
(scheme-modules): Add #:warn parameter. Use it instead of
'warn-about-load-error'.
(fold-modules): Add #:warn and pass it to 'scheme-modules'.
(all-modules): Likewise.
* gnu/bootloader.scm (bootloader-modules): Pass #:warn to 'all-modules'.
* gnu/packages.scm (fold-packages): Likewise.
* gnu/services.scm (all-service-modules): Likewise.
* guix/upstream.scm (importer-modules): Likewise.
This would crash 'guix refresh -u' with source URLs ending in
"…/v1.2.3".
* guix/upstream.scm (package-update): Be stricter when determining
ARCHIVE-TYPE.
* guix/scripts/lint.scm (check-for-updates): New procedure.
(%checkers): Add it.
* guix/scripts/refresh.scm (importer-modules, %updaters): Move
from here ...
* guix/upstream.scm: ... to here.
* guix/upstream.scm (uncompressed-tarball): New procedure.
(download-tarball): Use it when the basename of SIGNATURE-URL doesn't
contain the basename of URL.
* guix/upstream.scm (package-update-path): Rename to...
(package-latest-release): ... this. Remove 'version>?' check.
(package-latest-release*): New procedure.
(package-update): Use it.
* guix/scripts/refresh.scm (lookup-updater): Rename to...
(lookup-updater-by-name): ... this.
(warn-no-updater): New procedure.
(update-package): Add #:warn? parameter and honor it.
(check-for-package-update): New procedure.
(guix-refresh)[warn?]: New variable.
Replace inline code when UPDATE? is false with a call to
'check-for-package-update'.
Pass WARN? to 'check-for-package-update' and 'update-package'.
* doc/guix.texi (Invoking guix refresh): Document it. Fix a couple of
typos.
Previously, something like 'guix import gnu which' would spit out a
backtrace if, say, the 'which' tarball could not be authenticated.
* guix/upstream.scm (download-tarball): Mention failure modes in
docstring.
* guix/import/gnu.scm (gnu-package->sexp): Return #f when
'download-tarball' returns #f.
* guix/scripts/import.scm (guix-import): Call 'leave' when IMPORTER does
not return a (package ...) sexp.
Previously, the resulting 'signature-urls' would contain N times the
same URL.
* guix/upstream.scm (coalesce-sources): Fix TWO in 'signature-urls'.
* tests/upstream.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/gnu-maintenance.scm (latest-ftp-release): Add #:file->signature
parameter. Honor it.
(latest-gnome-release): Pass #:file->signature.
* guix/upstream.scm (coalesce-sources): Keep 'signature-urls' as #f
unless both sources provide it.
This is a followup to 0a7c5a0.
* guix/import/gnu.scm (preferred-archive-type): Use
'upstream-source-archive-types' instead of 'gnu-release-archive-types'.
(gnu-package->sexp): Use 'upstream-source-urls' et al. Update call to
'download-tarball'.
(gnu->guix-package): Use <upstream-source> instead of <gnu-release>.
* guix/upstream.scm (upstream-source-archive-types): Export.
* guix/gnu-maintenance.scm (<gnu-release>): Remove.
(coalesce-releases): Move to upstream.scm. Rename to
'coalesce-sources'; adjust callers.
(releases, latest-release): Return <upstream-source> objects instead
of <gnu-release> objects.
(latest-release*, non-emacs-gnu-package?): New procedures.
(gnu-release-archive-types): Remove.
(%gnu-updater): New variable.
(package-update-path, download-tarball, package-update,
update-package-source): Move to...
* guix/upstream.scm: ... here. New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Replace gnu-maintenance.scm with upstream.scm.
* guix/scripts/refresh.scm (%updaters): New variable.
(update-package): Adjust to new 'package-update' interface.
(guix-refresh): Adjust to new 'package-update-path'. Remove
'false-if-exception' around it.