[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35776: Test guix-pack-localstatedir.sh and guix-pack-relocatable.sh
From: |
Ludovic Courtès |
Subject: |
bug#35776: Test guix-pack-localstatedir.sh and guix-pack-relocatable.sh crash when /gnu/store doesn't exist |
Date: |
Sat, 18 May 2019 12:29:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Ting-Wei Lan <address@hidden> skribis:
> It seems to me that the reason is that NIX_STORE_DIR is exported by
> test-env script, so the line
> NIX_STORE_DIR="`guile -c '(use-modules (guix config))(display %storedir)'`"
> not only changes the value of shell variable NIX_STORE_DIR but also
> exports it to the environment.
> Therefore, the next line
> localstatedir="`guile -c '(use-modules (guix config))(display
> %localstatedir)'`"
> crashes at guix/config.scm when running the code
> (define %store-directory
> (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
> %storedir))
> because NIX_STORE_DIR points to a non-existent path /gnu/store.
> I attached a patch to avoid the crash by delaying the modification
> to NIX_STORE_DIR, but I am not sure if it is correct to do so.
Indeed. Pushed as baab87ac49e3f0f873e17eb16db9781189b1f2d1, thanks!
Ludo’.