unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Christina O'Donnell <cdo@mutix.org>
To: 68912@debbugs.gnu.org
Subject: bug#68912: Guix-home search paths shadow .config/guix/current
Date: Sat, 3 Feb 2024 13:12:14 +0000	[thread overview]
Message-ID: <7cd7e463-dfe5-4810-dc17-d1175e4696c3@mutix.org> (raw)

Hi,

On my machine the order of search paths are:

$ echo $PATH | tr : '\n'
/home/cdo/.guix-home/profile/bin
/home/cdo/.guix-home/profile/sbin
/run/setuid-programs
/home/cdo/.config/guix/current/bin
/home/cdo/.guix-profile/bin
/run/current-system/profile/bin
/run/current-system/profile/sbin
/gnu/store/gjsxzcc0gqpz4lpbsrbidlnn5ij1lfm1-gzip-1.12/bin
/gnu/store/z81jl0pb4ppkci4im6n856dkhi2ki2d3-coreutils-9.1/bin

This leads to unexpected results if you have Guix inside your home 
package list. (Which you might desire if you wanted to use Guix in a 
home container.)

The Guix you interact with stays stuck on the version that you had when 
you first `guix home reconfigured` a configuration with guix as a 
package. Then `guix pull` appears to succeed but `guix describe` is 
still stuck at the original version. And even a `guix home reconfigure` 
doesn't update the version because it's using the `guix` from the 
original `guix home reconfigure`.

The way out of this situation is to use 
`~/.config/guix/current/bin/guix` directly, setting $PATH manually, or 
simply removing `guix` from your home package list. However, the 
situation is preventable and undesirable and there's several possible 
solutions:

  1. Reorder the paths by default, keeping ~/.config/guix in front of 
~/.guix-home
  2. Have `guix home` warn when 'guix' is included as a package
  3. Have `guix pull` warn when Guix is shadowed and unable to be updated

My preference would be at least 1 and 3.

(Incidentally, how did gzip and coreutils get in there? I didn't put it 
there.)

I'm happy to contribute a patch if others agree that it's worth fixing.

Excited to contribute more!
  - Christina

----------------

Supplementary output:

$ guix describe
   guix aeb4943
     repository URL: https://git.savannah.gnu.org/git/guix.git
     branch: master
     commit: aeb494322ca9dec4a4d66a7d063239c8536bd538
$ guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Updating channel 'nonguix' from Git repository at 
'https://gitlab.com/nonguix/nonguix'...
Building from these channels:
   guix      https://git.savannah.gnu.org/git/guix.git    9389070
   nonguix   https://gitlab.com/nonguix/nonguix    fe2fcf1
Computing Guix derivation for 'x86_64-linux'... \
nothing to be done

hint: After setting `PATH', run `hash guix' to make sure your shell 
refers to `/home/cdo/.config/guix/current/bin/guix'.

$ hash guix
$ which guix
/home/cdo/.guix-home/profile/bin/guix
$ guix describe
   guix aeb4943
     repository URL: https://git.savannah.gnu.org/git/guix.git
     branch: master
     commit: aeb494322ca9dec4a4d66a7d063239c8536bd538





             reply	other threads:[~2024-02-03 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 13:12 Christina O'Donnell [this message]
2024-02-08  9:07 ` bug#68912: Guix-home search paths shadow .config/guix/current Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cd7e463-dfe5-4810-dc17-d1175e4696c3@mutix.org \
    --to=cdo@mutix.org \
    --cc=68912@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).