GNU bug report logs - #64861
[PATCH] guix: Add lint check for guix as propagated-input

Previous Next

Package: guix-patches;

Reported by: Karl Hallsby <karl <at> hallsby.com>

Date: Tue, 25 Jul 2023 18:06:01 UTC

Severity: normal

Tags: patch

Full log


Message #8 received at 64861 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Karl Hallsby <karl <at> hallsby.com>
Cc: 64861 <at> debbugs.gnu.org
Subject: Re: [bug#64861] [PATCH] guix: Add lint check for guix as
 propagated-input
Date: Tue, 25 Jul 2023 19:26:01 +0100
[Message part 1 (text/plain, inline)]
Karl Hallsby <karl <at> hallsby.com> writes:

> * guix/lint.scm (new check): Run lint check warning user if the provided
> package uses guix as a propagated-input.
>
> Passing guix as a propagated-input is problematic when users install a package
> into their profiles. This can cause the guix propagated by the package to be
> used in preference of the real one in $HOME/.config/. It was first noticed on
> IRC with https://logs.guix.gnu.org/guix/2023-07-22.log#044534, and reproduced
> with a different package https://logs.guix.gnu.org/guix/2023-07-25.log#054737.
> ---
>  guix/lint.scm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

I'm not sure this lint warning is helpful as in both cases mentioned in
the IRC links you provided (guile-imanifest and guix-data-service),
these packages provide Guile modules that depend on Guix, and therefore
the guix package is expected in their propagated inputs.

If you remove guix or make it a input instead of a propagated input,
then this breaks using the package, for example, with this change:

  modified   gnu/packages/guile-xyz.scm
  @@ -2098,8 +2098,10 @@ (define-public guile-imanifest
         (build-system guile-build-system)
         (native-inputs
          (list guile-3.0))
  +      (inputs
  +       (list guix))
         (propagated-inputs
  -       (list guile-readline guile-colorized guix))
  +       (list guile-readline guile-colorized))
         (home-page "https://sr.ht/~brown121407/guile-imanifest")
         (synopsis "Interactive Guix manifests")
         (description "This package provides functions to generate Guix manifests

Using guile-imanifest breaks:

  → ./pre-inst-env guix environment --pure --ad-hoc guile guile-imanifest -- guile -c "(use-modules (imanifest))"
  Backtrace:
    ...

  ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
  no code for module (guix profiles)


I think some other approach is needed to avoid people having problems
with the guix package appearing in their users profile.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 150 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.