From 22572d56cb3da5b176b5b5697d4e8e71067eab74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 26 Feb 2016 23:14:28 +0100 Subject: store: 'path-info-deriver' is #f when there is no deriver. * guix/store.scm (read-path-info): Use #f when we get the empty string for DERIVER. * guix/scripts/publish.scm (narinfo-string): Adjust accordingly. * tests/store.scm ("path-info-deriver"): New test. --- tests/store.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/store.scm') diff --git a/tests/store.scm b/tests/store.scm index 9d651ce5a9..de070eab23 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -856,6 +856,21 @@ (string->utf8 (call-with-output-string (cut write-file item <>)))))))) +(test-assert "path-info-deriver" + (let* ((b (add-text-to-store %store "build" "echo $foo > $out" '())) + (s (add-to-store %store "bash" #t "sha256" + (search-bootstrap-binary "bash" + (%current-system)))) + (d (derivation %store "the-thing" + s `("-e" ,b) + #:env-vars `(("foo" . ,(random-text))) + #:inputs `((,b) (,s)))) + (o (derivation->output-path d))) + (and (build-derivations %store (list d)) + (not (path-info-deriver (query-path-info %store b))) + (string=? (derivation-file-name d) + (path-info-deriver (query-path-info %store o)))))) + (test-end "store") -- cgit v1.2.3