bug-guix
[Top][All Lists]
Advanced

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

Re: [PATCH] Implement guix-package --upgrade


From: Ludovic Courtès
Subject: Re: [PATCH] Implement guix-package --upgrade
Date: Tue, 12 Feb 2013 10:50:12 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hi Mark!

Mark H Weaver <address@hidden> skribis:

> Here's an implementation of the -u/--upgrade option for guix-package.

Nice!

> +               (upgrade  (if (null? upgrade-regexps)
> +                             '()
> +                             (filter-map (match-lambda
> +                                          ((name _ _ _ _)
> +                                           (and (any (cut regexp-exec <> 
> name)
> +                                                     upgrade-regexps)
> +                                                (find-package name)))
> +                                          (_ #f))
> +                                         installed)))

It’s actually slightly more complex: you need to select those packages
that are installed and for which either a newer version is available
(per ‘version-string>?’, see gnu-maintenance.scm; should be moved to
utils.scm), or the version is identical and the output path differs (for
instance because one of its dependencies has changed.)

There are tests in guix-package.sh, but this one is going to be
difficult to test without building the world.

I think guix-package needs a -e switch (as for guix-build), which would
allow us to write dummy packages for test purposes.

WDYT?

Ludo’.



reply via email to

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