guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Package inputs in manifests


From: Ludovic Courtès
Subject: Package inputs in manifests
Date: Sun, 17 Nov 2019 11:35:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Simon!

zimoun <address@hidden> skribis:

>> Ah, that no.  But (guix scripts environment) has
>> ‘package-environment-inputs’, which does exactly that, and I guess we
>> could expose it and document it.
>
> Maybe I am doing wrong but I get:
>
> $ ./pre-inst-env guix package -p /tmp/guix-dev -m ~/tmp/manif-dep.scm
>
> installing new manifest from '/home/simon/tmp/manif-dep.scm' with 53 entries
> guix package: error: profile contains conflicting entries for gzip
> guix package: error:   first entry: gzip@1.10
> /gnu/store/py3k9zla9fj3z7430v4crqj5pyrsd3qj-gzip-1.10
> guix package: error:   second entry: gzip@1.10
> /gnu/store/i2cdl0hvrml8hjdqplqln8didnvxkgp5-gzip-1.10
> hint: You cannot have two different versions or variants of `gzip' in
> the same profile.
>
>
> where I tweak guix/scripts/environment.scm to export
> `package-environment-inputs' and ~/tmp/manif-dep.scm contains:
>
> (use-modules (guix)
>              (guix profiles)
>              (guix scripts environment)
>              (gnu packages package-management))
>
> (make-manifest (package-environment-inputs guix))

You’re doing it right!  It turns out that two different variants of
“gzip” appear: one in ‘%final-inputs’ (the implicit inputs of
‘gnu-build-system’) and another one somewhere else, hence the collision.

The solution is to pass ‘--allow-collisions’, which is what ‘guix
environment’ does by default precisely for that reason (see commit
afd06f605bf88a796acefc7ed598b43879346a6b).

We could check exactly why we end up with several ‘gzip’ instances, but
overall I think this kind of thing is hard to avoid for package inputs.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]