mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
weather: Add '--display-missing'.
* guix/scripts/weather.scm (report-server-coverage): Add #:display-missing? and honor it. (show-help, %options): Add "--display-missing". (guix-weather): Pass #:display-missing? to 'report-server-coverage'. * doc/guix.texi (Invoking guix weather): Document it.
This commit is contained in:
parent
e0dbed64c5
commit
71bb485541
2 changed files with 21 additions and 4 deletions
|
@ -10860,6 +10860,9 @@ likewise for @code{qgpgme} and the 46 packages that depend on it.
|
|||
If you are a Guix developer, or if you are taking care of this build farm,
|
||||
you'll probably want to have a closer look at these packages: they may simply
|
||||
fail to build.
|
||||
|
||||
@item --display-missing
|
||||
Display the list of store items for which substitutes are missing.
|
||||
@end table
|
||||
|
||||
@node Invoking guix processes
|
||||
|
|
|
@ -175,8 +175,10 @@ (define queued
|
|||
#f ;no derivation information
|
||||
(lset-intersection string=? queued items)))
|
||||
|
||||
(define (report-server-coverage server items)
|
||||
"Report the subset of ITEMS available as substitutes on SERVER."
|
||||
(define* (report-server-coverage server items
|
||||
#:key display-missing?)
|
||||
"Report the subset of ITEMS available as substitutes on SERVER.
|
||||
When DISPLAY-MISSING? is true, display the list of missing substitutes."
|
||||
(define MiB (* (expt 2 20) 1.))
|
||||
|
||||
(format #t (G_ "looking for ~h store items on ~a...~%")
|
||||
|
@ -260,7 +262,12 @@ (define MiB (* (expt 2 20) 1.))
|
|||
system
|
||||
(* (throughput builds build-timestamp)
|
||||
3600.))))
|
||||
(histogram build-system cons '() latest)))))))
|
||||
(histogram build-system cons '() latest))))
|
||||
|
||||
(when (and display-missing? (not (null? missing)))
|
||||
(newline)
|
||||
(format #t (G_ "Substitutes are missing for the following items:~%"))
|
||||
(format #t "~{ ~a~%~}" missing)))))
|
||||
|
||||
|
||||
;;;
|
||||
|
@ -280,6 +287,8 @@ (define (show-help)
|
|||
-c, --coverage[=COUNT]
|
||||
show substitute coverage for packages with at least
|
||||
COUNT dependents"))
|
||||
(display (G_ "
|
||||
--display-missing display the list of missing substitutes"))
|
||||
(display (G_ "
|
||||
-s, --system=SYSTEM consider substitutes for SYSTEM--e.g., \"i686-linux\""))
|
||||
(newline)
|
||||
|
@ -318,6 +327,9 @@ (define %options
|
|||
(alist-cons 'coverage
|
||||
(if arg (string->number* arg) 0)
|
||||
result)))
|
||||
(option '("display-missing") #f #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'display-missing? #t result)))
|
||||
(option '(#\s "system") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'system arg result)))))
|
||||
|
@ -525,7 +537,9 @@ (define (package-list opts)
|
|||
(package-outputs packages system))
|
||||
systems))))))
|
||||
(for-each (lambda (server)
|
||||
(report-server-coverage server items)
|
||||
(report-server-coverage server items
|
||||
#:display-missing?
|
||||
(assoc-ref opts 'display-missing?))
|
||||
(match (assoc-ref opts 'coverage)
|
||||
(#f #f)
|
||||
(threshold
|
||||
|
|
Loading…
Reference in a new issue