From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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 Message-ID: <87tvdsvywx.fsf@gnu.org> References: <1e5db66d-99b3-5926-e107-5c63413eb641@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRwbM-0000wW-49 for bug-guix@gnu.org; Sat, 18 May 2019 06:30:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRwbL-00038G-6y for bug-guix@gnu.org; Sat, 18 May 2019 06:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRwbL-00038A-3f for bug-guix@gnu.org; Sat, 18 May 2019 06:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hRwbK-00067Z-Sx for bug-guix@gnu.org; Sat, 18 May 2019 06:30:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <1e5db66d-99b3-5926-e107-5c63413eb641@gmail.com> (Ting-Wei Lan's message of "Fri, 17 May 2019 21:47:17 +0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ting-Wei Lan Cc: 35776-done@debbugs.gnu.org Ting-Wei Lan 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=3D"`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=3D"`guile -c '(use-modules (guix config))(display > %localstatedir)'`" > crashes at guix/config.scm when running the code > (define %store-directory > =C2=A0 (or (and=3D> (getenv "NIX_STORE_DIR") canonicalize-path) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0%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=C2=A0NIX_STORE_DIR, but I am not sure if it is correct to do so. Indeed. Pushed as baab87ac49e3f0f873e17eb16db9781189b1f2d1, thanks! Ludo=E2=80=99.