guix-devel
[Top][All Lists]
Advanced

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

Re: proposal: (define (find-guix-packages list-of-names) ... )


From: Florian Paul Schmidt
Subject: Re: proposal: (define (find-guix-packages list-of-names) ... )
Date: Sun, 15 Nov 2015 22:25:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi, and thanks for your reply..

On 11/15/2015 09:35 PM, Ludovic Courtès wrote:

> I think ‘specification->package’ from (gnu packages) is the
> procedure you want.  Like this:
> 
> (map specification->package '("guile-2" "gnupg-2.0" "coreutils"))
> 
> It emits a warning in case the specification is ambiguous.
> 
> Maybe we could/should use it in the example GuixSD configurations,
> and at least document it somewhere.
> 
> WDYT?

Sounds like a plan. Though in this use-case I think I'd prefer an
error over a warning. For the simple reason that during system
reconfigure a warning might be missed easily. Especially after a guix
pull where suddenly a package spec might become ambiguous where it
wasn't before and a different package gets chosen.

OTOH, maybe that's overdoing it and even with the error instead of a
warning there are still some failure modes somewhat similar to this:
E.g. Package foo disappears while a quite different package foo
appears (possibly in a different module). Quite unlikely but possible.


Regards,
Flo

P.S.: Note though that there are modes like this also for the now
common practice of using use-modules in a non-local way at the top of
the config file but they are more contrived (and depend on having just
the right use-modules calls and packages in the packages list).

I'm new to guile (and scheme and guix ;), but maybe there's a way to
use use-modules in a more local fashion. Together with the guarantee
that the module/package combination is unique (not including version
changes which are to be expected during a reconfigure after a guix
pull) it would be possible to avoid those kind of surprises if needed.


- -- 
https://fps.io
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWSPg8AAoJEA5f4Coltk8ZgLMH/1XkMnLgM1QDQHwe2BgnVDPw
idFQRpSP58hC9fld2mM2PVAygXz1GugGBE/zkGzbOSY2KP68gMmpVo61kLHek1r0
2Xy00h82RTTV97zDpe2z6hNpjWdysYKXIj+DaldE9B7rlY4tbllwOmGiyrm8skj9
+3R8Qx2mAqn312NqtQKgbzyD6v+jTfTyI+9e1MhrZN5Ab8eGO8LhYMdN78fm1qKi
kedQhha1FsFGEeA1X5u4qUky9Z5A0glI4afbipOfTHU/Asw2NNeETvuItd297evU
N0ovcIKkT/PM1X37IJ2/ZvlJPDeiDk9DVj8RjzGioiUUQ4Rt8fBhtiDjOHVVh1o=
=PjFY
-----END PGP SIGNATURE-----



reply via email to

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