Subject: [bug#45632] [PATCH] guix package: Warn if uses has 'guix' package in profile.

From: Jakub Kądziołka <[email-masked]>
Date: Thu, 07 Jan 2021 18:11:25 +0100

On Thu Jan 7, 2021 at 5:39 PM CET, zimoun wrote:
> Hi,
>
> On Sun, 3 Jan 2021 at 19:33, Jakub Kądziołka <[email-masked]>
> wrote:
> >
> > * guix/scripts/package.scm (warn-about-guix-in-profile): New procedure.
> > (process-actions): Call WARN-ABOUT-GUIX-IN-PROFILE before executing
> > transaction.
> > ---
> >
> > Unresolved questions:
> > - Is this the right place to put warn-about-guix-in-profile?
> > - The warning message seems to be hard-wrapped. Is this the right
> >   line length?
> > - Do we want to make this configurable? Some other warnings are, but in
> >   those cases it is the threshold that gets configured. In this case,
> >   there is no threshold.
>
> What is the use case? I have missed some context.

As the actual warning text explains, including the guix package in a
profile loaded by default breaks the 'guix pull' update mechanism, as
the guix package from the profile will take priority.

This is inspired by some tech support on IRC where this turned out to be
a root cause of a problem.

Moreover, if I'm not missing anything, running 'guix package -u' with
such a setup would *downgrade* the guix package each time.

> For example, I have the package 'guix' in some of my profiles and I
> would be annoyed to be warned. And I have it for good reasons. :-)

Okay, I can see now that it is not wise to skimp on configurability for
this. Though, I would like to hear more about your usecase - how do you
keep your guix updated, for example?

> Once the story about extension is good enough,

As in adding your own commands under the 'guix $CMD' namespace, or
something more sophisticated? For the former, git seems to have a quite
good mechanism - we could borrow that.

Regards,
Jakub Kądziołka