diff options
author | Mark H Weaver <mhw@netris.org> | 2017-06-26 00:00:58 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2017-06-26 00:00:58 -0400 |
commit | ed068b960eeedb92823238783779730319b8ba0e (patch) | |
tree | 36a4de280458d52520b911b2716eb5cea309fd78 /guix/scripts/refresh.scm | |
parent | a9308efec642bfbce480545a22fce848e6212456 (diff) | |
parent | ffc015bea26f24d862e7e877d907fbe1ab9a9967 (diff) | |
download | gnu-guix-ed068b960eeedb92823238783779730319b8ba0e.tar gnu-guix-ed068b960eeedb92823238783779730319b8ba0e.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/refresh.scm')
-rw-r--r-- | guix/scripts/refresh.scm | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index dd93e7d3e7..5add64d8e8 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -253,15 +253,32 @@ downloaded and authenticated; not updating~%") WARN? is true and no updater exists for PACKAGE, print a warning." (match (package-latest-release package updaters) ((? upstream-source? source) - (when (version>? (upstream-source-version source) - (package-version package)) - (let ((loc (or (package-field-location package 'version) - (package-location package)))) - (format (current-error-port) - (G_ "~a: ~a would be upgraded from ~a to ~a~%") - (location->string loc) - (package-name package) (package-version package) - (upstream-source-version source))))) + (let ((loc (or (package-field-location package 'version) + (package-location package)))) + (case (version-compare (upstream-source-version source) + (package-version package)) + ((>) + (format (current-error-port) + (G_ "~a: ~a would be upgraded from ~a to ~a~%") + (location->string loc) + (package-name package) (package-version package) + (upstream-source-version source))) + ((=) + (when warn? + (format (current-error-port) + (G_ "~a: info: ~a is already the latest version of ~a~%") + (location->string loc) + (package-version package) + (package-name package)))) + (else + (when warn? + (format (current-error-port) + (G_ "~a: warning: ~a is greater than \ +the latest known version of ~a (~a)~%") + (location->string loc) + (package-version package) + (package-name package) + (upstream-source-version source))))))) (#f (when warn? (warn-no-updater package))))) |