From caf96debc257dee9ad8b0ea74cc6a8241c30dad4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 23 Sep 2013 21:24:18 +0200 Subject: guix-register: Expect closures to refer to the original store. * nix/guix-register/guix-register.cc (prefix): New variable. (parse_opt): Use it. (register_validity): Change 'info.path' to the final store name. Hash the final under its real path. * tests/guix-register.sh: Adjust the contents of $closure accordingly. Rename 'NIX_LOCALSTATE_DIR' to 'NIX_STATE_DIR'. Don't try to call 'valid-path?'. Add test using 'sqlite3'. --- tests/guix-register.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/guix-register.sh b/tests/guix-register.sh index b76a1af54f..ca28fb0d95 100644 --- a/tests/guix-register.sh +++ b/tests/guix-register.sh @@ -38,9 +38,10 @@ cp -r "$to_copy" "$new_store_dir" copied="$new_store_dir/`basename $to_copy`" # Create a file representing a closure with zero references, and with an empty -# "deriver" field. +# "deriver" field. Note that we give the file name as it appears in the +# original store, and 'guix-register' translates it to match the prefix. cat >> "$closure" <