diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-01-15 11:31:16 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-15 12:05:25 +0100 |
commit | 35225dc57996ebc7a5a55462e0e52d85239195d9 (patch) | |
tree | ac2db7b9e83448679b1abf2fe7f37962109e51ff /guix | |
parent | 74a8b2cca1f522b8230bd7e8533bdebb011d0d2e (diff) |
guix package: '--upgrade' preserves package order.
Fixes <https://bugs.gnu.org/31142>.
Reported by Chris Marusich <cmmarusich@gmail.com>.
* guix/scripts/package.scm (options->installable)[upgraded]: Use 'fold'
instead of 'fold-right'. This reverts
eca16a3d1d9e6b2c064e0105c1015258bf2755f2.
* tests/guix-package-net.sh: Add 'guix package u' test.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/package.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 7ff6bfd6d8..5a8fd203ee 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -604,12 +604,12 @@ and upgrades." (options->upgrade-predicate opts)) (define upgraded - (fold-right (lambda (entry transaction) - (if (upgrade? (manifest-entry-name entry)) - (transaction-upgrade-entry entry transaction) - transaction)) - transaction - (manifest-entries manifest))) + (fold (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 |