From 22572d56cb3da5b176b5b5697d4e8e71067eab74 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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. --- guix/store.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'guix/store.scm') diff --git a/guix/store.scm b/guix/store.scm index 3d6cff4c21..8746d3c2d6 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -242,14 +242,16 @@ (define-record-type (path-info deriver hash references registration-time nar-size) path-info? - (deriver path-info-deriver) + (deriver path-info-deriver) ;string | #f (hash path-info-hash) (references path-info-references) (registration-time path-info-registration-time) (nar-size path-info-nar-size)) (define (read-path-info p) - (let ((deriver (read-store-path p)) + (let ((deriver (match (read-store-path p) + ("" #f) + (x x))) (hash (base16-string->bytevector (read-string p))) (refs (read-store-path-list p)) (registration-time (read-int p)) -- cgit v1.2.3