guix package: Do not misdiagnose upgrades when there are propagated inputs.

Fixes <https://bugs.gnu.org/35872>.
Reported by Andy Tai <atai@atai.org>.

* guix/profiles.scm (list=?, manifest-entry=?): New procedures.
* guix/scripts/package.scm (transaction-upgrade-entry): In the '=' case,
use 'manifest-entry=?' to determine whether it's an upgrade.
* tests/packages.scm ("transaction-upgrade-entry, zero upgrades,
propagated inputs"): New test.
This commit is contained in:
Ludovic Courtès 2020-03-30 23:34:48 +02:00
parent b9c79cae53
commit a357849f5b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
3 changed files with 54 additions and 8 deletions

View file

@ -240,14 +240,9 @@ non-zero relevance score."
;; displaying the list of packages to install/upgrade
;; upfront. Thus, if lowering NEW triggers a build (due
;; to grafts), assume NEW differs from ENTRY.
;; XXX: When there are propagated inputs, assume we need to
;; upgrade the whole entry.
(if (and (with-build-handler (const #f)
(string=? (manifest-entry-item
(lower-manifest-entry* new))
(manifest-entry-item entry)))
(null? (package-propagated-inputs pkg)))
(if (with-build-handler (const #f)
(manifest-entry=? (lower-manifest-entry* new)
entry))
transaction
(manifest-transaction-install-entry
new transaction)))))))))