Subject: bug#64358: [PATCH] refresh: Sort update specs by package location.

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 11 Jul 2023 00:17:43 +0200

Ludovic Courtès <[email-masked]> writes:

> Ricardo Wurmus <[email-masked]> skribis:
>
>> Fixes <https://issues.guix.gnu.org/64358>.
>>
>> * guix/scripts/refresh.scm (guix-refresh): Sort update specs by location from
>> bottom to top before updating packages.
>
> […]
>
>> +                (let* ((get-line
>> +                        (compose location-line
>> +                                 package-location
>> +                                 update-spec-package))
>
> Maybe s/get-line/spec-line/ ?

Okay, will change it.

I found that it’s probably not a good idea to sort by location-line
without also taking into account the file name.  My latest version uses
“location->string” and “string>” instead of “location-line” and “>”,
ensuring that changes to the same file remain grouped.

I’ll push this together with the bulk update of CRAN packages that I’m
working on.

Thanks for the review!

-- 
Ricardo