summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-09 10:47:52 +0100
committerLudovic Courtès <ludo@gnu.org>2022-03-18 16:03:33 +0100
commit625fa3cfe8c57cd5624608d2478c8c6be4c69c3b (patch)
tree2ed5a4a4a34a744e35a2b03a1488ce9dec504514 /guix
parent9e0f0123a018f7fb81779d858942ba01150a12ee (diff)
downloadguix-patches-625fa3cfe8c57cd5624608d2478c8c6be4c69c3b.tar
guix-patches-625fa3cfe8c57cd5624608d2478c8c6be4c69c3b.tar.gz
ui: 'show-what-to-build' highlights "would be downloaded" headings.
* guix/ui.scm (show-what-to-build): Highlight "X MB would be downloaded".
Diffstat (limited to 'guix')
-rw-r--r--guix/ui.scm74
1 files changed, 44 insertions, 30 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 8e4e3e2dfc..6c194eb3c9 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1041,21 +1041,28 @@ summary, and level 0 shows nothing."
(map colorized-store-item build)))
(cond ((>= verbosity 2)
(if display-download-size?
- (format (current-error-port)
- ;; TRANSLATORS: "MB" is for "megabyte"; it should be
- ;; translated to the corresponding abbreviation.
- (G_ "~:[~,1h MB would be downloaded:~%~{ ~a~%~}~;~]")
- (null? download)
- download-size
- (map (compose colorized-store-item substitutable-path)
- download))
- (format (current-error-port)
- (N_ "~:[The following file would be downloaded:~%~{ ~a~%~}~;~]"
- "~:[The following files would be downloaded:~%~{ ~a~%~}~;~]"
- (length download))
- (null? download)
- (map (compose colorized-store-item substitutable-path)
- download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ ;; TRANSLATORS: "MB" is for "megabyte"; it
+ ;; should be translated to the corresponding
+ ;; abbreviation.
+ (G_ "~:[~,1h MB would be downloaded:~%~;~]"))
+ (null? download)
+ download-size)
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ (N_ "~:[The following file would be downloaded:~%~;~]"
+ "~:[The following files would be downloaded:~%~;~]"
+ (length download)))
+ (null? download))
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download))))
(format (current-error-port)
(N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]"
"~:[The following grafts would be made:~%~{ ~a~%~}~;~]"
@@ -1094,21 +1101,28 @@ summary, and level 0 shows nothing."
(map colorized-store-item build)))
(cond ((>= verbosity 2)
(if display-download-size?
- (format (current-error-port)
- ;; TRANSLATORS: "MB" is for "megabyte"; it should be
- ;; translated to the corresponding abbreviation.
- (G_ "~:[~,1h MB will be downloaded:~%~{ ~a~%~}~;~]")
- (null? download)
- download-size
- (map (compose colorized-store-item substitutable-path)
- download))
- (format (current-error-port)
- (N_ "~:[The following file will be downloaded:~%~{ ~a~%~}~;~]"
- "~:[The following files will be downloaded:~%~{ ~a~%~}~;~]"
- (length download))
- (null? download)
- (map (compose colorized-store-item substitutable-path)
- download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ ;; TRANSLATORS: "MB" is for "megabyte"; it
+ ;; should be translated to the corresponding
+ ;; abbreviation.
+ (G_ "~:[~,1h MB will be downloaded:~%~;~]"))
+ (null? download)
+ download-size)
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download)))
+ (begin
+ (format (current-error-port)
+ (highlight
+ (N_ "~:[The following file will be downloaded:~%~;~]"
+ "~:[The following files will be downloaded:~%~;~]"
+ (length download)))
+ (null? download))
+ (format (current-error-port) "~{ ~a~%~}"
+ (map (compose colorized-store-item substitutable-path)
+ download))))
(format (current-error-port)
(N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]"
"~:[The following grafts will be made:~%~{ ~a~%~}~;~]"