GNU bug report logs - #35776
Test guix-pack-localstatedir.sh and guix-pack-relocatable.sh crash when /gnu/store doesn't exist

Previous Next

Package: guix;

Reported by: Ting-Wei Lan <lantw44 <at> gmail.com>

Date: Fri, 17 May 2019 13:48:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 35776-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ting-Wei Lan <lantw44 <at> gmail.com>
Cc: 35776-done <at> debbugs.gnu.org
Subject: Re: 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
Ting-Wei Lan <lantw44 <at> gmail.com> 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’.




This bug report was last modified 6 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.