GNU bug report logs - #63234
cached guix shell environment not capturing environment variables set in manifest

Previous Next

Package: guix;

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

Date: Tue, 2 May 2023 15:36:02 UTC

Severity: normal

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 63234 in the body.
You can then email your comments to 63234 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 bug-guix <at> gnu.org:
bug#63234; Package guix. (Tue, 02 May 2023 15:36: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 bug-guix <at> gnu.org. (Tue, 02 May 2023 15:36: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: bug-guix <bug-guix <at> gnu.org>
Subject: cached guix shell environment not capturing environment variables
 set in manifest
Date: Tue, 02 May 2023 11:34:59 -0400
Hi Guix,

Consider the following manifest.scm file:

--8<---------------cut here---------------start------------->8---
(setenv "DUMMY" "hello")

(packages->manifest
 (map specification->package
      (list "hello")))
--8<---------------cut here---------------end--------------->8---

Running:

--8<---------------cut here---------------start------------->8---
$ guix shell --rebuild-cache -m manifest.scm -- sh -c 'echo $DUMMY'
hello

$ guix shell -m manifest.scm -- sh -c 'echo $DUMMY'
--8<---------------cut here---------------end--------------->8---

I think this is a recent behavior change, otherwise I wouldn't have
gotten fond of that trick ;-).

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#63234; Package guix. (Tue, 02 May 2023 15:50:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 63234 <at> debbugs.gnu.org
Subject: Re: bug#63234: cached guix shell environment not capturing
 environment variables set in manifest
Date: Tue, 02 May 2023 17:48:57 +0200
Hi,

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

> Consider the following manifest.scm file:
>
> (setenv "DUMMY" "hello")
>
> (packages->manifest
>  (map specification->package
>       (list "hello")))
>
>
> Running:
>
> $ guix shell --rebuild-cache -m manifest.scm -- sh -c 'echo $DUMMY'
> hello
>
> $ guix shell -m manifest.scm -- sh -c 'echo $DUMMY'
>
> I think this is a recent behavior change, otherwise I wouldn't have
> gotten fond of that trick ;-).

Hmm, I don’t think it’s a recent change.  It’s a trick that might work
“by chance” but cannot be relied on.

Not-a-bug to me!

Ludo’.




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

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

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 63234-done <at> debbugs.gnu.org
Subject: Re: bug#63234: cached guix shell environment not capturing
 environment variables set in manifest
Date: Tue, 02 May 2023 22:11:55 -0400
Hi,

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

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> Consider the following manifest.scm file:
>>
>> (setenv "DUMMY" "hello")
>>
>> (packages->manifest
>>  (map specification->package
>>       (list "hello")))
>>
>>
>> Running:
>>
>> $ guix shell --rebuild-cache -m manifest.scm -- sh -c 'echo $DUMMY'
>> hello
>>
>> $ guix shell -m manifest.scm -- sh -c 'echo $DUMMY'
>>
>> I think this is a recent behavior change, otherwise I wouldn't have
>> gotten fond of that trick ;-).
>
> Hmm, I don’t think it’s a recent change.  It’s a trick that might work
> “by chance” but cannot be relied on.
>
> Not-a-bug to me!

Ah!  Okay then :-).  I'll stop using such trick.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 31 May 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 331 days ago.

Previous Next


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