From eca16a3d1d9e6b2c064e0105c1015258bf2755f2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 7 Oct 2017 15:44:23 +0200 Subject: guix package: '--upgrade' no longer reverses package order. Reported by Oleg Pykhalov at . * guix/scripts/package.scm (options->installable)[upgraded]: Use 'fold-right' instead of 'fold'. --- guix/scripts/package.scm | 12 ++++++------ 1 file 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 -- cgit v1.2.3