Mark H Weaver <[email protected]> skribis:
> I wrote:
>> Here's a preliminary patch that does two things:
>>
>> * Changes 'guix-build' and 'guix-package --install' so that only the
>> newest packages will be considered (unless a version number is
>> specified).
>>
>> * Implements 'guix-package --upgrade'.
>>
>> Although I'm not aware of any functional problems with this code, I'm
>> not entirely pleased with its organization. Nonetheless, I wanted to
>> make it available for early testing and comments.
>>
>> I welcome suggestions on how to improve this code.
>
> Sorry, that patch had a problem in guix-build. Here's a fixed version.
I haven’t actually tested, but it looks good to me!
I could have left ‘guix-build’ as is, because hackers should really use
-e when they want something specific, but I’m fine either way.
Could you update the doc, under “Invoking guix-package”, stating what
happens when giving a package name without a version number?
Minor remarks:
> +(define (find-newest-available-packages)
> + "Return a vhash with elements of the form
> + (name newest-version newest-package ...)
> +where the preferred package is listed first."
What about something like this:
Return a vhash keyed by package names, and with associated values of
the form
(newest-version newest-package)
> + (define (upgradeable? name current-version current-path)
> + ;; Return #t if there is a newer version available, or if the
> + ;; newest version if the same as the current one but the
> + ;; output path would be different than the current path.
Try to mention the variables here, like:
Return #t if there’s a version of package NAME newer than
CURRENT-VERSION ...
Other than that, please push!
Thanks,
Ludo’.