aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-03-31 23:14:56 +0200
committerLudovic Courtès <ludo@gnu.org>2018-03-31 23:30:50 +0200
commitfc95dc4c34bf88ebd8c21752bf6d54b5cf752d1a (patch)
tree7ebef949fc6268dcbdae3664db9b67f5fcc3bee8 /tests
parente1bff5a75c9b9806509a90428b8a87c03cc67248 (diff)
downloadgnu-guix-fc95dc4c34bf88ebd8c21752bf6d54b5cf752d1a.tar
gnu-guix-fc95dc4c34bf88ebd8c21752bf6d54b5cf752d1a.tar.gz
guix package: Add '--allow-collisions'.
Fixes <https://bugs.gnu.org/30830>. Suggested by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/package.scm (build-and-use-profile): Add #:allow-collisions? and pass it to 'profile-derivation'. (show-help, %options): Add '--allow-collisions'. (manifest-action, process-actions): Pass #:allow-collisions? to 'build-and-use-profile'. * tests/guix-package.sh: Add collision test. * doc/guix.texi (Invoking guix package): Document '--allow-collisions'.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 760a2e4c9b..aa5eaa66e7 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -60,6 +60,14 @@ test -L "$profile" && test -L "$profile-1-link"
! test -f "$profile-2-link"
test -f "$profile/bin/guile"
+# Collisions are properly flagged (in this case, 'python-wrapper' propagates
+# python@3, which conflicts with python@2.)
+if guix package --bootstrap -n -p "$profile" -i python@2 python-wrapper
+then false; else true; fi
+
+guix package --bootstrap -n -p "$profile" -i python@2 python-wrapper \
+ --allow-collisions
+
# No search path env. var. here.
guix package -p "$profile" --search-paths
guix package -p "$profile" --search-paths | grep '^export PATH='