mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
upstream: Allow downgrades.
Previously, 'guix refresh -u guile=3.0.0' would do nothing. With this
change, it actually downgrades 'guile'.
This is a followup to 8aeccc6240
.
* guix/upstream.scm (package-update): Ignore 'version>?' check
when #:version is passed. Warn about downgrades.
This commit is contained in:
parent
c6ac47afdf
commit
a330bfdf5b
1 changed files with 14 additions and 3 deletions
|
@ -501,11 +501,22 @@ (define* (package-update store package
|
|||
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)."
|
||||
values: 'always', 'never', and 'interactive' (default).
|
||||
|
||||
When VERSION is specified, update PACKAGE to that version, even if that is a
|
||||
downgrade."
|
||||
(match (package-latest-release package updaters #:version version)
|
||||
((? upstream-source? source)
|
||||
(if (version>? (upstream-source-version source)
|
||||
(if (or (version>? (upstream-source-version source)
|
||||
(package-version package))
|
||||
(and version
|
||||
(begin
|
||||
(warning (package-location package)
|
||||
(G_ "downgrading '~a' from ~a to ~a~%")
|
||||
(package-name package)
|
||||
(package-version package)
|
||||
(upstream-source-version source))
|
||||
#t)))
|
||||
(let ((method (match (package-source package)
|
||||
((? origin? origin)
|
||||
(origin-method origin))
|
||||
|
|
Loading…
Reference in a new issue