diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-03-12 18:30:05 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-12 18:32:16 +0100 |
commit | 2843fed0e973145f01fb2004c99aca8e8837b332 (patch) | |
tree | 557ce76dee262145406599d58148b03763f54bcc /guix | |
parent | 71bb485541328cdce214ada44be998570571bf36 (diff) | |
download | guix-patches-2843fed0e973145f01fb2004c99aca8e8837b332.tar guix-patches-2843fed0e973145f01fb2004c99aca8e8837b332.tar.gz |
weather: Allow for multiple '--manifest' options.
* guix/scripts/weather.scm (guix-weather)[package-list]: Account for all
the 'manifest entries in OPTS.
* doc/guix.texi (Invoking guix weather): Document it.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/weather.scm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 60915d3451..733986be0c 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -499,17 +499,19 @@ SERVER. Display information for packages with at least THRESHOLD dependents." (define (guix-weather . args) (define (package-list opts) ;; Return the package list specified by OPTS. - (let ((file (assoc-ref opts 'manifest)) - (base (filter-map (match-lambda - (('argument . spec) - (specification->package spec)) - (_ - #f)) - opts))) - (if (and (not file) (null? base)) + (let ((files (filter-map (match-lambda + (('manifest . file) file) + (_ #f)) + opts)) + (base (filter-map (match-lambda + (('argument . spec) + (specification->package spec)) + (_ + #f)) + opts))) + (if (and (null? files) (null? base)) (all-packages) - (append base - (if file (load-manifest file) '()))))) + (append base (append-map load-manifest files))))) (with-error-handling (parameterize ((current-terminal-columns (terminal-columns)) |