bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60566: [PATCH] environment: Fix '--emulate-fhs' option overriding $P


From: John Kehayias
Subject: bug#60566: [PATCH] environment: Fix '--emulate-fhs' option overriding $PATH.
Date: Thu, 05 Jan 2023 21:19:48 +0000

On Wed, Jan 04, 2023 at 11:33 PM, jman wrote:

> Hello,
>
> When emulating a FHS I observe that env vars seems to be not preserved. 
> Example,
> the following command will not preserve $PATH:
>
>     guix shell --container --emulate-fhs --preserve='^PATH$'
>
> When creating a container *without* emulating a FHS, env vars are available,
> example:
>
>     guix shell --container --preserve='^PATH$'
>
> Pastebin log of a sample of this behaviour:
> https://paste.sr.ht/~jman/65e7f96c445504e11f55595b237280e0c1e3ad34
>
> ref: https://lists.gnu.org/archive/html/help-guix/2023-01/msg00002.html
>
> Thanks for an opinion on this

Thanks for reporting, I can confirm this behavior.

Here is a patch for this where the FHS directories are added to the
current value of $PATH. I believe this should in general be fine since
this is the last step before actually calling the command given to 'guix
shell' and thus $PATH has been set or preserved as needed already.

CC'ing Ludo as most familiar with this code. Anything we should be aware
of here? This change to $PATH in the first place wasn't strictly needed
('guix shell' already has the profile bin directory) but I thought made
sense to make it look most like FHS.

Thanks!
John

Attachment: 0001-environment-Fix-emulate-fhs-option-overriding-PATH.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]