From fc95dc4c34bf88ebd8c21752bf6d54b5cf752d1a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 31 Mar 2018 23:14:56 +0200 Subject: guix package: Add '--allow-collisions'. Fixes . Suggested by Ricardo Wurmus . * 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'. --- tests/guix-package.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/guix-package.sh') 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=' -- cgit v1.2.3