aboutsummaryrefslogtreecommitdiff
path: root/tests
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
parent6d382339de1c9fbe20ec056fb5200d5724a4aa44 (diff)
downloadpatches-fc8fdcf56ecc159cb4e85ffdde60a54c4fa5c04f.tar
patches-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 'tests')
-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 5ecb33193f..99952f130c 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"
test "`guix package -A super-non-portable-emacs`" = ""
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
+
# Using 'GUIX_BUILD_OPTIONS'.
available="`guix package -A | sort`"
GUIX_BUILD_OPTIONS="--dry-run --no-grafts"