guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 14/15] scripts: environment: Add --container option.


From: Ludovic Courtès
Subject: Re: [PATCH 14/15] scripts: environment: Add --container option.
Date: Tue, 27 Oct 2015 11:13:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hello!

One thing I noticed is that ‘guix environment --container’ behaves
sub-optimally when ‘SHELL’ is set or set to the empty string:

--8<---------------cut here---------------start------------->8---
$ guix environment alta --pure --container

[...]

In execvp of /home/ludo/.guix-profile/bin/bash: No such file or directory
$ SHELL= guix environment alta --pure --container
In execvp of : No such file or directory
--8<---------------cut here---------------end--------------->8---

One has to explicitly ‘unset SHELL’ to sidestep the problem.  This may
be confusing to newcomers.

What about automatically mapping $SHELL in the container when it is set?


Also, ‘SHELL’ is overridden in the environment:

--8<---------------cut here---------------start------------->8---
$ echo $SHELL
/home/ludo/.guix-profile/bin/bash
$ guix environment alta --container --expose=$SHELL
bash-4.3# echo $SHELL
/bin/sh
# ls -l /proc/2/exe
lrwxrwxrwx 1 0 0 0 Oct 27 10:11 /proc/2/exe -> /home/ludo/.guix-profile/bin/bash
bash-4.3# ls -l /home/ludo/.guix-profile/bin/bash
-r-xr-xr-x 2 65534 65534 917320 Jan  1  1970 /home/ludo/.guix-profile/bin/bash
--8<---------------cut here---------------end--------------->8---

I’m not sure if ‘SHELL’ should be added to ‘%precious-variables’.

Thoughts?

Thanks,
Ludo’.



reply via email to

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