diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-11-12 23:44:47 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-11-13 00:29:05 +0100 |
commit | f80594cc41d7ad491f14a73d594228bacafdc871 (patch) | |
tree | 21405e6294986e2258fe6cde2822915dfdee0a2f /tests/packages.scm | |
parent | 9336e5b5e7b05e636b147aba2c97357620711c2a (diff) | |
download | patches-f80594cc41d7ad491f14a73d594228bacafdc871.tar patches-f80594cc41d7ad491f14a73d594228bacafdc871.tar.gz |
packages: Suitably cope with indirect store paths as package sources.
* guix/packages.scm (package-source-derivation): Don't let indirect
store paths pass through.
* tests/packages.scm ("package-source-derivation, indirect store path"):
New test.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r-- | tests/packages.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index 7c5dd9f4e1..b499c380ce 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -122,6 +122,17 @@ (package-source package)))) (string=? file source))) +(test-assert "package-source-derivation, indirect store path" + (let* ((dir (add-to-store %store "guix-build" #t "sha256" + (dirname (search-path %load-path + "guix/build/utils.scm")))) + (package (package (inherit (dummy-package "p")) + (source (string-append dir "/utils.scm")))) + (source (package-source-derivation %store + (package-source package)))) + (and (direct-store-path? source) + (string-suffix? "utils.scm" source)))) + (test-equal "package-source-derivation, snippet" "OK" (let* ((file (search-bootstrap-binary "guile-2.0.7.tar.xz" |