mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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.
This commit is contained in:
parent
6d382339de
commit
fc8fdcf56e
2 changed files with 28 additions and 5 deletions
|
@ -294,7 +294,11 @@ (define (supersede old new)
|
||||||
(output (manifest-entry-output old)))
|
(output (manifest-entry-output old)))
|
||||||
transaction)))
|
transaction)))
|
||||||
|
|
||||||
(match entry
|
(match (if (manifest-transaction-removal-candidate? entry transaction)
|
||||||
|
'dismiss
|
||||||
|
entry)
|
||||||
|
('dismiss
|
||||||
|
transaction)
|
||||||
(($ <manifest-entry> name version output (? string? path))
|
(($ <manifest-entry> name version output (? string? path))
|
||||||
(match (vhash-assoc name (find-newest-available-packages))
|
(match (vhash-assoc name (find-newest-available-packages))
|
||||||
((_ candidate-version pkg . rest)
|
((_ candidate-version pkg . rest)
|
||||||
|
@ -875,11 +879,11 @@ (define (transform-entry entry)
|
||||||
#:dry-run? dry-run?)))))
|
#:dry-run? dry-run?)))))
|
||||||
opts)
|
opts)
|
||||||
|
|
||||||
;; Then, process normal package installation/removal/upgrade.
|
;; Then, process normal package removal/installation/upgrade.
|
||||||
(let* ((manifest (profile-manifest profile))
|
(let* ((manifest (profile-manifest profile))
|
||||||
(step1 (options->installable opts manifest
|
(step1 (options->removable opts manifest
|
||||||
(manifest-transaction)))
|
(manifest-transaction)))
|
||||||
(step2 (options->removable opts manifest step1))
|
(step2 (options->installable opts manifest step1))
|
||||||
(step3 (manifest-transaction
|
(step3 (manifest-transaction
|
||||||
(inherit step2)
|
(inherit step2)
|
||||||
(install (map transform-entry
|
(install (map transform-entry
|
||||||
|
|
|
@ -279,8 +279,27 @@ guix package --bootstrap --install-from-file="$module_dir/package.scm"
|
||||||
test "`guix package -A super-non-portable-emacs`" = ""
|
test "`guix package -A super-non-portable-emacs`" = ""
|
||||||
test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: "
|
test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: "
|
||||||
|
|
||||||
|
# Don't upgrade packages marked for removal: <http://bugs.gnu.org/27262>.
|
||||||
|
guix package --bootstrap -p "$profile" -i guile-bootstrap
|
||||||
|
|
||||||
|
cat > "$module_dir/foo.scm"<<EOF
|
||||||
|
(define-module (foo)
|
||||||
|
#:use-module (guix)
|
||||||
|
#:use-module (gnu packages bootstrap))
|
||||||
|
|
||||||
|
(define-public x
|
||||||
|
(package (inherit %bootstrap-guile) (version "42")))
|
||||||
|
EOF
|
||||||
|
|
||||||
|
guix package --bootstrap -p "$profile" -r guile-bootstrap -u guile
|
||||||
|
test ! -f "$profile/bin/guile"
|
||||||
|
guix package --bootstrap -p "$profile" --roll-back
|
||||||
|
test -f "$profile/bin/guile"
|
||||||
|
rm "$profile-2-link"
|
||||||
|
|
||||||
unset GUIX_PACKAGE_PATH
|
unset GUIX_PACKAGE_PATH
|
||||||
|
|
||||||
|
|
||||||
# Using 'GUIX_BUILD_OPTIONS'.
|
# Using 'GUIX_BUILD_OPTIONS'.
|
||||||
available="`guix package -A | sort`"
|
available="`guix package -A | sort`"
|
||||||
GUIX_BUILD_OPTIONS="--dry-run --no-grafts"
|
GUIX_BUILD_OPTIONS="--dry-run --no-grafts"
|
||||||
|
|
Loading…
Reference in a new issue