aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-05 16:09:52 +0100
committerLudovic Courtès <ludo@gnu.org>2020-03-05 16:33:37 +0100
commite7671685a882a2269718c3949b7f2cd995cb85e4 (patch)
tree77985a5b4bf17c0697fe5a200c1a00ec29330bcb
parentf42f39ad68354d19c63222a9630c6e340843aa86 (diff)
downloadguix-e7671685a882a2269718c3949b7f2cd995cb85e4.tar.gz
guix-e7671685a882a2269718c3949b7f2cd995cb85e4.zip
weather: Parameterize '%graft?' upfront.
* guix/scripts/weather.scm (guix-weather): Parameterize %GRAFT? upfront.
-rw-r--r--guix/scripts/weather.scm20
1 files changed, 12 insertions, 8 deletions
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 7bfa786358..629844768a 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -500,7 +500,12 @@ SERVER. Display information for packages with at least THRESHOLD dependents."
(if file (load-manifest file) '())))))
(with-error-handling
- (parameterize ((current-terminal-columns (terminal-columns)))
+ (parameterize ((current-terminal-columns (terminal-columns))
+
+ ;; Set grafting upfront in case the user's input depends on
+ ;; it (e.g., a manifest or code snippet that calls
+ ;; 'gexp->derivation').
+ (%graft? #f))
(let* ((opts (parse-command-line args %options
(list %default-options)
#:build-options? #f))
@@ -513,13 +518,12 @@ SERVER. Display information for packages with at least THRESHOLD dependents."
(systems systems)))
(packages (package-list opts))
(items (with-store store
- (parameterize ((%graft? #f))
- (concatenate
- (run-with-store store
- (mapm %store-monad
- (lambda (system)
- (package-outputs packages system))
- systems)))))))
+ (concatenate
+ (run-with-store store
+ (mapm %store-monad
+ (lambda (system)
+ (package-outputs packages system))
+ systems))))))
(for-each (lambda (server)
(report-server-coverage server items)
(match (assoc-ref opts 'coverage)