From afd06f605bf88a796acefc7ed598b43879346a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 21 Jun 2017 16:50:59 +0200 Subject: environment: Disable profile collision checks. Reported by Efraim Flashner. This is a followup to a654dc4bcf7c8e205bdefa1a1d5f23444dd22778. * guix/profiles.scm (profile-derivation): Add #:allow-collisions? and honor it. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:allow-collisions? #f to 'profile-derivation'. * tests/guix-environment.sh: Test "guix environment guix". --- guix/profiles.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'guix/profiles.scm') diff --git a/guix/profiles.scm b/guix/profiles.scm index 0c70975f7e..dcb5186c7a 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1199,10 +1199,14 @@ the entries in MANIFEST." #:key (hooks %default-profile-hooks) (locales? #t) + (allow-collisions? #f) system target) "Return a derivation that builds a profile (aka. 'user environment') with the given MANIFEST. The profile includes additional derivations returned by the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc. +Unless ALLOW-COLLISIONS? is true, a '&profile-collision-error' is raised if +entries in MANIFEST collide (for instance if there are two same-name packages +with a different version number.) When LOCALES? is true, the build is performed under a UTF-8 locale; this adds a dependency on the 'glibc-utf8-locales' package. @@ -1212,8 +1216,10 @@ are cross-built for TARGET." (mlet* %store-monad ((system (if system (return system) (current-system))) - (ok? (check-for-collisions manifest system - #:target target)) + (ok? (if allow-collisions? + (return #t) + (check-for-collisions manifest system + #:target target))) (extras (if (null? (manifest-entries manifest)) (return '()) (sequence %store-monad -- cgit v1.2.3