~ruther/guix-local

eca16a3d1d9e6b2c064e0105c1015258bf2755f2 — Ludovic Courtès 8 years ago 3ae76f7
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'.
1 files changed, 6 insertions(+), 6 deletions(-)

M guix/scripts/package.scm
M guix/scripts/package.scm => guix/scripts/package.scm +6 -6
@@ 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