guix-patches
[Top][All Lists]
Advanced

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

bug#26652: [PATCH 2/2] scripts: refresh: Add -m manifest option.


From: Ludovic Courtès
Subject: bug#26652: [PATCH 2/2] scripts: refresh: Add -m manifest option.
Date: Wed, 03 May 2017 22:04:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Mathieu Othacehe <address@hidden> skribis:

> * guix/scripts/refresh.scm (%options): Add -m option,
> (show-help): document it,
> (get-manifest-packages): new procedure,
> (guix-refresh): use packages from manifest if specified, otherwise
> keep the previous behaviour.

This sounds useful!

>    (display (_ "
> +  -m, --manifest=FILE    select all the packages in FILE manifest"))

“select all the package from the manifest in FILE” maybe?

> +(define (get-manifest-packages manifest)
> +  "Return the list of packages in loaded MANIFEST."
> +  (let* ((user-module (make-user-module '((guix profiles) (gnu))))
> +         (manifest    (load* manifest user-module)))
> +    (manifest->packages manifest)))

With ‘manifest->packages’ moved in this module, that would be fine.

Also, maybe s/get-manifest-packages/packages-from-manifest/, because
‘get-’ is quite unusual.  :-)

> +         (packages
> +          (or manifest-packages args-packages)))

Maybe (append (match (assoc-ref opts 'manifest)
                (#f '())
                ((? string? file) (packages-from-manifest file)))
              args-packages)

?

Could you also update guix.texi to mention this option and the intended
use case?

Thank you!

Ludo’.





reply via email to

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