unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* fixing sticky package
@ 2022-07-18  7:51 András Vöröskői
  2022-07-18  8:09 ` Ricardo Wurmus
  2022-07-18 10:01 ` Csepp
  0 siblings, 2 replies; 6+ messages in thread
From: András Vöröskői @ 2022-07-18  7:51 UTC (permalink / raw)
  To: help-guix

Hi,

I have done something like this:
1. I have zig@0.10 installed in my profile.
2. Started a guix shell -m guix.scm which has zig@0.9
3. Run zig version and it reported 0.10.0
4. guix remove zig@0.10
5. zig version still reports 0.10.0

At that point I have switched to panic mode, exited from everything, but
now when I run `guix package -I` it reports an only `zls` and `git-minimal`
installed, which is fine.
However when I run `which zig` it finds `zig` in /gnu/store.

If I try to `guix remove zig` it says zig is not found in profile.

How can I remove zig from my profile?

Thanks,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fixing sticky package
  2022-07-18  7:51 fixing sticky package András Vöröskői
@ 2022-07-18  8:09 ` Ricardo Wurmus
  2022-07-18  8:19   ` András Vöröskői
  2022-07-18 10:01 ` Csepp
  1 sibling, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2022-07-18  8:09 UTC (permalink / raw)
  To: András Vöröskői; +Cc: help-guix


Hi András,

> I have done something like this:
> 1. I have zig@0.10 installed in my profile.
> 2. Started a guix shell -m guix.scm which has zig@0.9
> 3. Run zig version and it reported 0.10.0

What does your ~/.bashrc look like?
What does “guix shell --check” say?

> However when I run `which zig` it finds `zig` in /gnu/store.

This indicates that GUIX_PROFILE was not set when the environment
variables in etc/profile were set.  When GUIX_PROFILE is set the
environment variables are set relative to the location it specifies;
when it is not set the /gnu/store locations will be used, which is
rarely what you want.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fixing sticky package
  2022-07-18  8:09 ` Ricardo Wurmus
@ 2022-07-18  8:19   ` András Vöröskői
  2022-07-18  9:53     ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: András Vöröskői @ 2022-07-18  8:19 UTC (permalink / raw)
  To: help-guix

Hi,


What does your ~/.bashrc look like?
> What does “guix shell --check” say?
>

I do not use bash. My fish config.fish has the following relevant lines:
set GUIX_PROFILE $HOME/.config/guix/current; fenv source
$GUIX_PROFILE/etc/profile
set GUIX_PROFILE $HOME/.guix-profile; fenv source $GUIX_PROFILE/etc/profile

fenv is just a wrapper, so fish can handle bash scripts.

guix shell --check says "All is good!" I am not sure what are You
interested in particularly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fixing sticky package
  2022-07-18  8:19   ` András Vöröskői
@ 2022-07-18  9:53     ` Ricardo Wurmus
  2022-07-24 14:33       ` András Vöröskői
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2022-07-18  9:53 UTC (permalink / raw)
  To: András Vöröskői; +Cc: help-guix


András Vöröskői <voroskoi@gmail.com> writes:

> I do not use bash. My fish config.fish has the following relevant lines:
> set GUIX_PROFILE $HOME/.config/guix/current; fenv source
> $GUIX_PROFILE/etc/profile
> set GUIX_PROFILE $HOME/.guix-profile; fenv source $GUIX_PROFILE/etc/profile
>
> fenv is just a wrapper, so fish can handle bash scripts.

etc/profile sets variables differently dependent on whether
$GUIX_PROFILE is set or not.  This appears to be the problem here,
because you say that “which” returns a location in /gnu/store (instead
of ~/.guix-profile).

If you can see /gnu/store/… in the output of “env” that’s the cause of
the problem.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fixing sticky package
  2022-07-18  7:51 fixing sticky package András Vöröskői
  2022-07-18  8:09 ` Ricardo Wurmus
@ 2022-07-18 10:01 ` Csepp
  1 sibling, 0 replies; 6+ messages in thread
From: Csepp @ 2022-07-18 10:01 UTC (permalink / raw)
  To: András Vöröskői; +Cc: help-guix


András Vöröskői <voroskoi@gmail.com> writes:

> Hi,
>
> I have done something like this:
> 1. I have zig@0.10 installed in my profile.
> 2. Started a guix shell -m guix.scm which has zig@0.9
> 3. Run zig version and it reported 0.10.0
> 4. guix remove zig@0.10
> 5. zig version still reports 0.10.0
>
> At that point I have switched to panic mode, exited from everything, but
> now when I run `guix package -I` it reports an only `zls` and `git-minimal`
> installed, which is fine.
> However when I run `which zig` it finds `zig` in /gnu/store.
>
> If I try to `guix remove zig` it says zig is not found in profile.
>
> How can I remove zig from my profile?
>
> Thanks,

guix shell runs a program (a shell by default) in a temporary
environment that has some packages added.
guix remove is an alias of guix package --remove, which works on
persistent stateful profiles, like ~/.guix-profile.
You told it to create a new profile generation with zig removed, which
it did.  But that does not affect the temporary profile that was also
active.
To modify the list of packages in a guix shell profile, you can either
source additional search paths, or exit the guix shell and run it again
with a different manifest or package list.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: fixing sticky package
  2022-07-18  9:53     ` Ricardo Wurmus
@ 2022-07-24 14:33       ` András Vöröskői
  0 siblings, 0 replies; 6+ messages in thread
From: András Vöröskői @ 2022-07-24 14:33 UTC (permalink / raw)
  To: help-guix

Hi,

On Mon, Jul 18, 2022 at 11:56 AM Ricardo Wurmus <rekado@elephly.net> wrote:

> etc/profile sets variables differently dependent on whether
> $GUIX_PROFILE is set or not.  This appears to be the problem here,
> because you say that “which” returns a location in /gnu/store (instead
> of ~/.guix-profile).
>
> If you can see /gnu/store/… in the output of “env” that’s the cause of
> the problem.
>

 Sorry for the late reply, this was my problem indeed. Evaluated value of
.guix-profile popped up in PATH, that's why I seemed like I can not remove
packages.
Turns out that the profile changed, just PATH variable stuck pointing to
the old profile.

Thank You!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-24 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18  7:51 fixing sticky package András Vöröskői
2022-07-18  8:09 ` Ricardo Wurmus
2022-07-18  8:19   ` András Vöröskői
2022-07-18  9:53     ` Ricardo Wurmus
2022-07-24 14:33       ` András Vöröskői
2022-07-18 10:01 ` Csepp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).