diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2021-06-23 18:45:21 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2021-06-23 18:45:21 +0200 |
commit | 9dea3f101f252331c049c03f501398a5ec837ba9 (patch) | |
tree | 61d683a9fae3e147332d07fef207c1ddf51fc301 /tests | |
parent | 7f0af119a1e3ea9d0ae53811b619437b3e942702 (diff) | |
parent | 620669fd17306c2edb21c64a99fa47160fefb319 (diff) | |
download | guix-9dea3f101f252331c049c03f501398a5ec837ba9.tar.gz |
Merge branch 'master' into core-updates
Conflicts: gnu/packages/cups.scm gnu/packages/python-web.scm gnu/packages/web.scm guix/build/maven/pom.scm
Diffstat (limited to 'tests')
-rw-r--r-- | tests/profiles.scm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 1a06ff88f3..06a0387221 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -279,6 +279,36 @@ (string=? (dirname (readlink bindir)) (derivation->output-path guile)))))) +(test-assertm "profile-derivation, ordering & collisions" + ;; ENTRY1 and ENTRY2 both provide 'bin/guile'--a collision. Make sure + ;; ENTRY1 "wins" over ENTRY2. See <https://bugs.gnu.org/49102>. + (mlet* %store-monad + ((entry1 -> (package->manifest-entry %bootstrap-guile)) + (entry2 -> (manifest-entry + (name "fake-guile") + (version "0") + (item (computed-file + "fake-guile" + #~(begin + (mkdir #$output) + (mkdir (string-append #$output "/bin")) + (call-with-output-file + (string-append #$output "/bin/guile") + (lambda (port) + (display "Fake!\n" port)))))))) + (guile (package->derivation %bootstrap-guile)) + (drv (profile-derivation (manifest (list entry1 entry2)) + #:hooks '() + #:locales? #f)) + (profile -> (derivation->output-path drv)) + (bindir -> (string-append profile "/bin")) + (file -> (string-append bindir "/guile")) + (_ (built-derivations (list drv)))) + (return (string=? (readlink file) + (string-append + (derivation->output-path guile) + "/bin/guile"))))) + (test-assertm "load-profile" (mlet* %store-monad ((entry -> (package->manifest-entry %bootstrap-guile)) |