GNU bug report logs - #45958
[PATCH core-updates v3 1/2] utils: Retrieve the store prefix from NIX_STORE_DIR, not STORE_DIR.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 18 Jan 2021 16:53:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45958 in the body.
You can then email your comments to 45958 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#45958; Package guix-patches. (Mon, 18 Jan 2021 16:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 18 Jan 2021 16:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: guix-patches <at> gnu.org,
	45774 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH core-updates v3 1/2] utils: Retrieve the store prefix from
 NIX_STORE_DIR, not STORE_DIR.
Date: Mon, 18 Jan 2021 11:51:20 -0500
On the daemon side, nixStore gets set to the environment variable
NIX_STORE_DIR, else the environment variable NIX_STORE else the compile time
macro NIX_STORE_DIR (see the Settings::processEnvironment method in
nix/libstore/globals.cc).  Hence, it is more appropriate to lookup the
environment variable NIX_STORE_DIR than NIX_STORE in (guix build utils).

* guix/build/utils.scm (%store-directory): Call getenv with NIX_STORE_DIR
instead of NIX_STORE.
---
 guix/build/utils.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 76180e67e0..2cbdb31505 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -144,7 +144,7 @@
 
 (define (%store-directory)
   "Return the directory name of the store."
-  (or (getenv "NIX_STORE")
+  (or (getenv "NIX_STORE_DIR")
       "/gnu/store"))
 
 (define (store-file-name? file)
-- 
2.29.2





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 27 Jan 2021 03:59:02 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Wed, 27 Jan 2021 03:59:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 45958-done <at> debbugs.gnu.org
Cc: 45774-done <at> debbugs.gnu.org, ludo <at> gnu.org
Subject: Re: bug#45958: [PATCH core-updates v3 1/2] utils: Retrieve the
 store prefix from NIX_STORE_DIR, not STORE_DIR.
Date: Tue, 26 Jan 2021 22:58:53 -0500
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> On the daemon side, nixStore gets set to the environment variable
> NIX_STORE_DIR, else the environment variable NIX_STORE else the compile time
> macro NIX_STORE_DIR (see the Settings::processEnvironment method in
> nix/libstore/globals.cc).  Hence, it is more appropriate to lookup the
> environment variable NIX_STORE_DIR than NIX_STORE in (guix build utils).
>
> * guix/build/utils.scm (%store-directory): Call getenv with NIX_STORE_DIR
> instead of NIX_STORE.
> ---
>  guix/build/utils.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/guix/build/utils.scm b/guix/build/utils.scm
> index 76180e67e0..2cbdb31505 100644
> --- a/guix/build/utils.scm
> +++ b/guix/build/utils.scm
> @@ -144,7 +144,7 @@
>  
>  (define (%store-directory)
>    "Return the directory name of the store."
> -  (or (getenv "NIX_STORE")
> +  (or (getenv "NIX_STORE_DIR")
>        "/gnu/store"))
>  
>  (define (store-file-name? file)

I found that both environment variables should be honored and pushed
with a revised explanation in 47a6a938c3c4d0bbe7b6a3c64ff75d7bfb2f24fb.

Closing,

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#45958; Package guix-patches. (Wed, 27 Jan 2021 23:12:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 45774-done <at> debbugs.gnu.org, 45958-done <at> debbugs.gnu.org
Subject: Re: bug#45958: [PATCH core-updates v3 1/2] utils: Retrieve the
 store prefix from NIX_STORE_DIR, not STORE_DIR.
Date: Thu, 28 Jan 2021 00:10:53 +0100
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

>>  (define (%store-directory)
>>    "Return the directory name of the store."
>> -  (or (getenv "NIX_STORE")
>> +  (or (getenv "NIX_STORE_DIR")
>>        "/gnu/store"))
>>  
>>  (define (store-file-name? file)
>
> I found that both environment variables should be honored and pushed
> with a revised explanation in 47a6a938c3c4d0bbe7b6a3c64ff75d7bfb2f24fb.

Sounds good to me, thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 25 Feb 2021 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 53 days ago.

Previous Next


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