summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
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 /tests/guix-package.sh
parent6d382339de1c9fbe20ec056fb5200d5724a4aa44 (diff)
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 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 5ecb33193fe..99952f130cf 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -279,8 +279,27 @@ guix package --bootstrap --install-from-file="$module_dir/package.scm"
279test "`guix package -A super-non-portable-emacs`" = "" 279test "`guix package -A super-non-portable-emacs`" = ""
280test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: " 280test "`guix package -s super-non-portable-emacs | grep ^systems:`" = "systems: "
281 281
282# Don't upgrade packages marked for removal: <http://bugs.gnu.org/27262>.
283guix package --bootstrap -p "$profile" -i guile-bootstrap
284
285cat > "$module_dir/foo.scm"<<EOF
286(define-module (foo)
287 #:use-module (guix)
288 #:use-module (gnu packages bootstrap))
289
290(define-public x
291 (package (inherit %bootstrap-guile) (version "42")))
292EOF
293
294guix package --bootstrap -p "$profile" -r guile-bootstrap -u guile
295test ! -f "$profile/bin/guile"
296guix package --bootstrap -p "$profile" --roll-back
297test -f "$profile/bin/guile"
298rm "$profile-2-link"
299
282unset GUIX_PACKAGE_PATH 300unset GUIX_PACKAGE_PATH
283 301
302
284# Using 'GUIX_BUILD_OPTIONS'. 303# Using 'GUIX_BUILD_OPTIONS'.
285available="`guix package -A | sort`" 304available="`guix package -A | sort`"
286GUIX_BUILD_OPTIONS="--dry-run --no-grafts" 305GUIX_BUILD_OPTIONS="--dry-run --no-grafts"