summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-06-26 22:48:57 +0200
committerLudovic Courtès <ludo@gnu.org>2017-06-26 22:52:06 +0200
commitfc8fdcf56ecc159cb4e85ffdde60a54c4fa5c04f (patch)
tree48cb3a6242753407b7a1075a3a33f496c5e94bc7 /guix/scripts/package.scm
parent6d382339de1c9fbe20ec056fb5200d5724a4aa44 (diff)
downloadgnu-guix-fc8fdcf56ecc159cb4e85ffdde60a54c4fa5c04f.tar
gnu-guix-fc8fdcf56ecc159cb4e85ffdde60a54c4fa5c04f.tar.gz
guix package: 'guix package -r PKG -u' does not upgrade PKG.
Fixes <http://bugs.gnu.org/27262>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY matches 'manifest-transaction-removal-candidate?' and return TRANSACTION if it does. (process-actions): Move 'options->removable' from step 2 to step 1.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 1f835ca5a5..400623d41b 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -294,7 +294,11 @@ of relevance scores."
(output (manifest-entry-output old)))
transaction)))
- (match entry
+ (match (if (manifest-transaction-removal-candidate? entry transaction)
+ 'dismiss
+ entry)
+ ('dismiss
+ transaction)
(($ <manifest-entry> name version output (? string? path))
(match (vhash-assoc name (find-newest-available-packages))
((_ candidate-version pkg . rest)
@@ -875,11 +879,11 @@ processed, #f otherwise."
#:dry-run? dry-run?)))))
opts)
- ;; Then, process normal package installation/removal/upgrade.
+ ;; Then, process normal package removal/installation/upgrade.
(let* ((manifest (profile-manifest profile))
- (step1 (options->installable opts manifest
- (manifest-transaction)))
- (step2 (options->removable opts manifest step1))
+ (step1 (options->removable opts manifest
+ (manifest-transaction)))
+ (step2 (options->installable opts manifest step1))
(step3 (manifest-transaction
(inherit step2)
(install (map transform-entry