guix-devel
[Top][All Lists]
Advanced

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

Re: Profiles/manifests-related command line interface enhancements


From: Mark H Weaver
Subject: Re: Profiles/manifests-related command line interface enhancements
Date: Thu, 24 Oct 2019 15:23:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Pierre,

Pierre Neidhardt <address@hidden> writes:

> Danny Milosavljevic <address@hidden> writes:
>
>> On Thu, 24 Oct 2019 11:32:55 +0200
>> Pierre Neidhardt <address@hidden> wrote:
>>
>>>- The inverse command, =guix deactivate /path/to/profile=.
>>> This can be useful to deactivate a profile that was activated during login.
>>
>> That is not composable and sounds like a HUGE effort for what would otherwise
>> one "exit" command.
>
> Why isn't it composable?
>
> It does not seem too hard: if I'm not mistaken, it boils down to
> removing all environment entries that match a given profile.

It wouldn't be sufficient to remove them.  You'd have to restore the
previous settings.  For example, if we remove the settings for PATH,
MANPATH, etc, without restoring the previous settings, I doubt that you
would be pleased with the results.

It seems to me that the most natural approach to allow restoring the
previous environment settings is to launch a subshell when you activate
a profile.  That subshell can then simply be exited to restore the
previous settings.

Does that make sense?

      Regards,
        Mark



reply via email to

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