pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store.
authorLudovic Courtès <ludo@gnu.org>
Sat, 18 May 2019 10:21:34 +0000 (12:21 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sat, 18 May 2019 10:23:31 +0000 (12:23 +0200)
Fixes <https://bugs.gnu.org/35776>.
Reported by Ting-Wei Lan <lantw44@gmail.com>.

* tests/guix-pack-localstatedir.sh: Set 'storedir' before
'NIX_STORE_DIR'.
* tests/guix-pack-relocatable.sh: Likewise.

tests/guix-pack-localstatedir.sh
tests/guix-pack-relocatable.sh

index b734b0f..042887e 100644 (file)
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -27,8 +27,9 @@ guix pack --version
 # the test in the user's global store if possible, on the grounds that
 # binaries may already be there or can be built or downloaded inexpensively.
 
-NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`"
+storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
 localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
+NIX_STORE_DIR="$storedir"
 GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
 export NIX_STORE_DIR GUIX_DAEMON_SOCKET
 
index c45a679..ebada62 100644 (file)
@@ -27,8 +27,9 @@ guix pack --version
 # run it on the user's global store if possible, on the grounds that binaries
 # may already be there or can be built or downloaded inexpensively.
 
-NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`"
+storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
 localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
+NIX_STORE_DIR="$storedir"
 GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
 export NIX_STORE_DIR GUIX_DAEMON_SOCKET