From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: zimon.toutoune@gmail.com, me@tobias.gr, 45632@debbugs.gnu.org
Subject: [bug#45632] [PATCH] guix package: Warn if uses has 'guix' package in profile.
Date: Thu, 07 Jan 2021 18:58:14 +0100 [thread overview]
Message-ID: <C8D4CZ61UT11.1NVSH9KIFRCCP@gravity> (raw)
In-Reply-To: <CAJ3okZ0bQ4ruVpqv96Ah_rhTBbYOOEt9WyEtfdAW+dMcNvvhCg@mail.gmail.com>
On Thu Jan 7, 2021 at 6:56 PM CET, zimoun wrote:
> Well, if the conflict is between the package 'guix' and the 'upgrade'
> command, then the warning should be there, IMHO.
The upgrade command is not part of the problem here, the same can be
observed if you use 'guix package -m' instead.
You avoid the problem by putting ~/.config/guix/current/bin first in
your path. I just checked, and that is the default on Guix System.
However, on a foreign distro, ~/.guix-profile/bin will be first in $PATH
unless the user intervenes with manual configuration.
In light of this, perhaps a better solution would be to unify the
profile loading in foreign-Guix's /etc/profile/guix.sh with Guix
System's /etc/profile?
The problem with that is, /etc/profile/guix.sh is only created once by
guix-install.sh, and doesn't get updated... perhaps *this* is something
worth fixing, to start with?
> > How about warning on pull instead? That should address the ‘halp,
> > me Guix be Benjamin Buttonin'’ support calls that I assume
> > inspired this.
>
> Wait, does someone install packages in the profile
> "~/.config/guix/current"? And does they install the package 'guix' in
> this profile? Nan...
Nah, the scenario is much less convoluted:
1. $PATH contains ~/.guix-profile/bin:~/.config/guix/current/bin, in
that order, as that is currently the default on a foreign distro.
2. User adds the guix package to their ~/.guix-profile. This doesn't
need to happen with 'guix package -i', in fact the IRC conversation that
inspired this [1] (though I seem to recall earlier occurrences of the
same problem) the user was making use of a manifest file. It might even
be easier to encounter this with a manifest file due to its clean-slate
nature.
3. ~/.guix-profile/bin/guix now takes priority. This means
- guix describe doesn't work
- guix pull has no effect
- guix package (-u or -m) will use an older 'guix' package than is
currently installed, as a packaged guix version doesn't contain the
package definition of itself, but the one that was previously
packaged.
I hope this helps resolve your confusion.
Regards,
Jakub Kądziołka
[1]: http://logs.guix.gnu.org/guix/2021-01-01.log#163217
next prev parent reply other threads:[~2021-01-07 18:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-03 18:32 [bug#45632] [PATCH] guix package: Warn if uses has 'guix' package in profile Jakub Kądziołka
2021-01-07 16:39 ` zimoun
2021-01-07 17:11 ` Jakub Kądziołka
2021-01-07 17:46 ` zimoun
2021-01-07 20:31 ` Ricardo Wurmus
2021-01-07 17:15 ` Tobias Geerinckx-Rice via Guix-patches via
2021-01-07 17:56 ` zimoun
2021-01-07 17:58 ` Jakub Kądziołka [this message]
2021-01-07 19:25 ` zimoun
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=C8D4CZ61UT11.1NVSH9KIFRCCP@gravity \
--to=kuba@kadziolka.net \
--cc=45632@debbugs.gnu.org \
--cc=me@tobias.gr \
--cc=zimon.toutoune@gmail.com \
/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).