From 349fd3b11f320453ad8eeb3031621d0ffcaf078d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 11 Jan 2014 16:55:04 +0100 Subject: guix-register: Support registration in the current store, without '--prefix'. * nix/guix-register/guix-register.cc (register_validity): Leave 'info.path' unmodified when PREFIX is empty. (main): Call 'settings.processEnvironment' early on. Leave 'settings.nixStore' unmodified when PREFIX is empty. --- tests/guix-register.sh | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'tests/guix-register.sh') diff --git a/tests/guix-register.sh b/tests/guix-register.sh index ca28fb0d95..ee633af4f9 100644 --- a/tests/guix-register.sh +++ b/tests/guix-register.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2013 Ludovic Courtès +# Copyright © 2013, 2014 Ludovic Courtès # # This file is part of GNU Guix. # @@ -29,6 +29,33 @@ rm -rf "$new_store" exit_hook=":" trap "chmod -R +w $new_store ; rm -rf $new_store $closure ; \$exit_hook" EXIT +# +# Registering items in the current store---i.e., without '--prefix'. +# + +new_file="$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-guix-register-$$" +echo "Fake store file to test registration." > "$new_file" + +# Register the file with zero references and no deriver. +guix-register <