guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] guix: refresh: Use bags.


From: Ludovic Courtès
Subject: Re: [PATCH] guix: refresh: Use bags.
Date: Sat, 25 Oct 2014 23:36:08 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

Eric Bavier <address@hidden> skribis:

> Ludovic Courtès writes:
>
>> Eric Bavier <address@hidden> skribis:
>>
>>> Ludovic Courtès writes:
>>>
>>> From 1d22367e0806cea004631e22a782b7db3ffe65b0 Mon Sep 17 00:00:00 2001
>>> From: Eric Bavier <address@hidden>
>>> Date: Mon, 13 Oct 2014 13:46:09 -0500
>>> Subject: [PATCH] guix: refresh: Use bags.
>>>
>>> * guix/packages.scm (bag-direct-inputs): New procedure.
>>> * gnu/packages.scm (package-dependencies): Use it.
>>>   (fold-packages*): New procedure.
>>> * guix/scripts/refresh.scm (guix-refresh)[list-dependent]: Use it.
>>
>> [...]
>>
>> Could you move the computation of the package list to a different
>> procedure?  Possibly merging it with the existing expression that
>> computes ‘packages’ and which is already quite big.
>
> New patch attached that cleans up the package list computation a bit.
>
>
> From 0125e2d9a1564eb5e0817d50ea304bb4cb8d7030 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <address@hidden>
> Date: Mon, 20 Oct 2014 11:44:03 -0500
> Subject: [PATCH] guix: refresh: Use bags.
>
> * guix/packages.scm (bag-direct-inputs): New procedure.
> * gnu/packages.scm (package-dependencies): Use it.
>   (fold-packages*): New procedure.
> * guix/scripts/refresh.scm (guix-refresh)[list-dependent]: Use it.

Looks good to me.

Ideally, we’d make one patch for the refactor, one for the new feature,
and one for the ‘guix refresh -l’ change, for easier review and
bisection should a regression be found, but that’s OK here.

> This patch also changes the behavior of `guix refresh` a little.
> Previously, if there were a package with two versions, e.g. bison-2.7
> and bison-3.0.2, `guix refresh bison` would report::
>
>   gnu/packages/bison.scm:33:4: bison would be upgraded from 2.7 to 3.0.2
>
> Which is silly because we already have a bison-3.0.2.  This patch uses
> specification->package for the command-line named packages, so that only
> the newest version of a package is considered by default for upgrading.
> I would imagine this is the expected behavior.

Yes, that’s definitely an improvement.

In some cases, such as old stable branches of GCC, the situation is more
complex, but the general case is as you describe.

Thanks!

Ludo’.



reply via email to

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