aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-10-07 15:44:23 +0200
committerLudovic Courtès <ludo@gnu.org>2017-10-07 17:08:32 +0200
commiteca16a3d1d9e6b2c064e0105c1015258bf2755f2 (patch)
tree8d7e2aab6bb5eaa50d27c14c5c0a6f8b02d35020
parent3ae76f7f57706cf5cc4144d4ff62968e3d4c3aa4 (diff)
downloadpatches-eca16a3d1d9e6b2c064e0105c1015258bf2755f2.tar
patches-eca16a3d1d9e6b2c064e0105c1015258bf2755f2.tar.gz
guix package: '--upgrade' no longer reverses package order.
Reported by Oleg Pykhalov <go.wigust@gmail.com> at <https://lists.gnu.org/archive/html/help-guix/2017-10/msg00000.html>. * guix/scripts/package.scm (options->installable)[upgraded]: Use 'fold-right' instead of 'fold'.
-rw-r--r--guix/scripts/package.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 4adc705220..0e365018a9 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -604,12 +604,12 @@ and upgrades."
(options->upgrade-predicate opts))
(define upgraded
- (fold (lambda (entry transaction)
- (if (upgrade? (manifest-entry-name entry))
- (transaction-upgrade-entry entry transaction)
- transaction))
- transaction
- (manifest-entries manifest)))
+ (fold-right (lambda (entry transaction)
+ (if (upgrade? (manifest-entry-name entry))
+ (transaction-upgrade-entry entry transaction)
+ transaction))
+ transaction
+ (manifest-entries manifest)))
(define to-install
(filter-map (match-lambda