[PATCH 0/2] Printing a more concise build plan

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Marius Bakke
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 22 Jul 2020 23:40
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20200722214018.32353-1-ludo@gnu.org
Hello Guix!

These patches implement a suggestion Pierre made a while back:
showing by default fewer details about what will/would be built
or downloaded, and omitting info about grafts and hooks.

The verbosity level here is controlled via the existing
‘--verbosity’ or ‘-v’ flag (which thus now control two things).

Here are examples of the result:

Toggle snippet (19 lines)
$ ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl -n --no-grafts
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations would be built:
/gnu/store/y2inlprxbigqvknm5qwjwsqgljxfbri4-disk-image.drv
/gnu/store/gclxh7i8smp71hz0p7wcj6qkf377wigy-image-dir.drv
/gnu/store/21fin1j5pnjzfwbc70wdpzl3iyjym8xp-genimage.cfg.drv
/gnu/store/aqcziad6ghfaainjibpdfypc8m2rr1vm-partition.img.drv
/gnu/store/484d4fd9q9827bc09ia8bi1dgxl8gpwn-grub.cfg.drv
/gnu/store/nnldmy339w9xxnybir48w14yz2xk0pmx-system.drv

[...]

/gnu/store/ddxz08xvasphckdralifb624y3c7hrkx-rc.drv
/gnu/store/kq9qvn0m063m02cxf4kjipkf6x8vbvip-profile.drv
/gnu/store/y9if6nrykcqfnzxvb4cci2nzhmz1ipx5-parameters.drv
/gnu/store/w09j0p6126qcacylb455m5dn008yi04g-module-import.drv
49.9 MB would be downloaded

Same with grafts:

Toggle snippet (4 lines)
$ ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl -n
36.2 MB would be downloaded

With ‘guix package’:

Toggle snippet (26 lines)
$ ./pre-inst-env guix install vim-full krita -n
The following packages would be installed:
vim-full 8.2.1145
krita 4.2.9

76.9 MB would be downloaded
$ ./pre-inst-env guix install vim-full krita -n --no-grafts
The following packages would be installed:
vim-full 8.2.1145
krita 4.2.9

The following derivation would be built:
/gnu/store/shf0anw8l0y9hg4l8qp1fym4bvwq5kh9-profile.drv
76.9 MB would be downloaded
$ ./pre-inst-env guix install inkscape hugin -n
The following package would be upgraded:
inkscape (dependencies or package changed)

The following package would be installed:
hugin 2019.2.0

The following derivation would be built:
/gnu/store/lsi56ap8lzchfy8y76y7wirzfiqvb3ca-hugin-2019.2.0.drv
46.2 MB would be downloaded

The current behavior is obtain with ‘-v2’, which remains the
default for ‘guix build’:

Toggle snippet (12 lines)
$ ./pre-inst-env guix build inkscape hugin -n
The following derivation would be built:
/gnu/store/lsi56ap8lzchfy8y76y7wirzfiqvb3ca-hugin-2019.2.0.drv
46.2 MB would be downloaded:
/gnu/store/3jvjmwm0srgxxjwngv28bif8l4ksfbnp-autotrace-0.40.0-20190624.59
/gnu/store/gg36g9h2nzmq4dzrcr21ndb09nybqys0-inkscape-1.0
/gnu/store/n94n0ggdhck5a2prsd1r468x3p6i68p4-enblend-enfuse-4.2
/gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5
/gnu/store/0i4h5cf1a71pj319svzz88g2z07cvdk3-wxwidgets-3.0.5.1
/gnu/store/bwz9f0lg9lxscj6jfcgxmzqng3s1f1n3-vigra-1.11.1

It’s also possible to use ‘-v0’ now.

How does that sound?

Personally, I’m find it a bit disconcerting that so few is displayed
when substitutes are available, but it also feels more “lightweight”
this way. I really like that what would be built appears clearly,
whereas now you have to scroll up possibly several pages to find
that info, especially upon ‘guix upgrade’.

Feedback welcome!

Ludo’.

Ludovic Courtès (2):
ui: Add #:verbosity to 'show-what-to-build'.
scripts: Pass #:verbosity to 'build-notifier'.

guix/scripts/archive.scm | 2 +
guix/scripts/build.scm | 2 +
guix/scripts/copy.scm | 2 +
guix/scripts/deploy.scm | 4 +-
guix/scripts/environment.scm | 2 +
guix/scripts/pack.scm | 2 +
guix/scripts/package.scm | 2 +
guix/scripts/pull.scm | 2 +
guix/scripts/system.scm | 11 ++-
guix/ui.scm | 175 ++++++++++++++++++++++-------------
10 files changed, 135 insertions(+), 69 deletions(-)

--
2.27.0
L
L
Ludovic Courtès wrote on 22 Jul 2020 23:46
[PATCH 1/2] ui: Add #:verbosity to 'show-what-to-build'.
(address . 42481@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20200722214657.32591-1-ludo@gnu.org
* guix/ui.scm (%default-verbosity): New variable.
(show-what-to-build): Add #:verbosity and honor it.
(build-notifier): Add #:verbosity and pass it to 'show-what-to-build'.
---
guix/ui.scm | 175 ++++++++++++++++++++++++++++++++--------------------
1 file changed, 109 insertions(+), 66 deletions(-)

Toggle diff (220 lines)
diff --git a/guix/ui.scm b/guix/ui.scm
index 27bcade9dd..b8376c11a1 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -931,17 +931,25 @@ that the rest."
(color DARK))
(string-drop file prefix)))))
+(define %default-verbosity
+ ;; Default verbosity level for 'show-what-to-build'.
+ 2)
+
(define* (show-what-to-build store drv
#:key dry-run? (use-substitutes? #t)
+ (verbosity %default-verbosity)
(mode (build-mode normal)))
"Show what will or would (depending on DRY-RUN?) be built in realizing the
derivations listed in DRV using MODE, a 'build-mode' value. The elements of
DRV can be either derivations or derivation inputs.
Return two values: a Boolean indicating whether there's something to build,
-and a Boolean indicating whether there's something to download. When
-USE-SUBSTITUTES?, check and report what is prerequisites are available for
-download."
+and a Boolean indicating whether there's something to download.
+
+When USE-SUBSTITUTES?, check and report what is prerequisites are available
+for download. VERBOSITY is an integer indicating the level of details to be
+shown: level 2 and higher provide all the details, level 1 shows a high-level
+summary, and level 0 shows nothing."
(define inputs
(map (match-lambda
((? derivation? drv) (derivation-input drv))
@@ -1000,71 +1008,104 @@ download."
;; display when we have information for all of DOWNLOAD.
(not (any (compose zero? substitutable-download-size) download)))
+ ;; Combinatorial explosion ahead along two axes: DRY-RUN? and VERBOSITY.
+ ;; Unfortunately, this is hardly avoidable for proper i18n.
(if dry-run?
(begin
- (format (current-error-port)
- (N_ "~:[The following derivation would be built:~%~{ ~a~%~}~;~]"
- "~:[The following derivations would be built:~%~{ ~a~%~}~;~]"
- (length build))
- (null? build) (map colorized-store-item build))
- (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)))
- (format (current-error-port)
- (N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]"
- "~:[The following grafts would be made:~%~{ ~a~%~}~;~]"
- (length graft))
- (null? graft) (map colorized-store-item graft))
- (format (current-error-port)
- (N_ "~:[The following profile hook would be built:~%~{ ~a~%~}~;~]"
- "~:[The following profile hooks would be built:~%~{ ~a~%~}~;~]"
- (length hook))
- (null? hook) (map colorized-store-item hook)))
+ (unless (zero? verbosity)
+ (format (current-error-port)
+ (N_ "~:[The following derivation would be built:~%~{ ~a~%~}~;~]"
+ "~:[The following derivations would be built:~%~{ ~a~%~}~;~]"
+ (length build))
+ (null? build) (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)))
+ (format (current-error-port)
+ (N_ "~:[The following graft would be made:~%~{ ~a~%~}~;~]"
+ "~:[The following grafts would be made:~%~{ ~a~%~}~;~]"
+ (length graft))
+ (null? graft) (map colorized-store-item graft))
+ (format (current-error-port)
+ (N_ "~:[The following profile hook would be built:~%~{ ~a~%~}~;~]"
+ "~:[The following profile hooks would be built:~%~{ ~a~%~}~;~]"
+ (length hook))
+ (null? hook) (map colorized-store-item hook)))
+ ((= verbosity 1)
+ ;; Display the bare minimum; don't mention grafts and hooks.
+ (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~%~;~]")
+ (null? download) download-size)
+ (format (current-error-port)
+ (N_ "~:[~h item would be downloaded~%~;~]"
+ "~:[~h items would be downloaded~%~;~]"
+ (length download))
+ (null? download) (length download))))))
+
(begin
- (format (current-error-port)
- (N_ "~:[The following derivation will be built:~%~{ ~a~%~}~;~]"
- "~:[The following derivations will be built:~%~{ ~a~%~}~;~]"
- (length build))
- (null? build) (map colorized-store-item build))
- (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)))
- (format (current-error-port)
- (N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]"
- "~:[The following grafts will be made:~%~{ ~a~%~}~;~]"
- (length graft))
- (null? graft) (map colorized-store-item graft))
- (format (current-error-port)
- (N_ "~:[The following profile hook will be built:~%~{ ~a~%~}~;~]"
- "~:[The following profile hooks will be built:~%~{ ~a~%~}~;~]"
- (length hook))
- (null? hook) (map colorized-store-item hook))))
+ (unless (zero? verbosity)
+ (format (current-error-port)
+ (N_ "~:[The following derivation will be built:~%~{ ~a~%~}~;~]"
+ "~:[The following derivations will be built:~%~{ ~a~%~}~;~]"
+ (length build))
+ (null? build) (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)))
+ (format (current-error-port)
+ (N_ "~:[The following graft will be made:~%~{ ~a~%~}~;~]"
+ "~:[The following grafts will be made:~%~{ ~a~%~}~;~]"
+ (length graft))
+ (null? graft) (map colorized-store-item graft))
+ (format (current-error-port)
+ (N_ "~:[The following profile hook will be built:~%~{ ~a~%~}~;~]"
+ "~:[The following profile hooks will be built:~%~{ ~a~%~}~;~]"
+ (length hook))
+ (null? hook) (map colorized-store-item hook)))
+ ((= verbosity 1)
+ ;; Display the bare minimum; don't mention grafts and hooks.
+ (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~%~;~]")
+ (null? download) download-size)
+ (format (current-error-port)
+ (N_ "~:[~h item will be downloaded~%~;~]"
+ "~:[~h items will be downloaded~%~;~]"
+ (length download))
+ (null? download) (length download)))))))
(check-available-space installed-size)
@@ -1073,7 +1114,8 @@ download."
(define show-what-to-build*
(store-lift show-what-to-build))
-(define* (build-notifier #:key (dry-run? #f) (use-substitutes? #t))
+(define* (build-notifier #:key (dry-run? #f) (use-substitutes? #t)
+ (verbosity %default-verbosity))
"Return a procedure suitable for 'with-build-handler' that, when
'build-things' is called, invokes 'show-what-to-build' to display the build
plan. When DRY-RUN? is true, the 'with-build-handler' form returns without
@@ -1107,6 +1149,7 @@ any build happening."
(show-what-to-build store inputs
#:dry-run? dry-run?
#:use-substitutes? use-substitutes?
+ #:verbosity verbosity
#:mode mode)))
(unless (and (or build? download?)
--
2.27.0
L
L
Ludovic Courtès wrote on 22 Jul 2020 23:46
[PATCH 2/2] scripts: Pass #:verbosity to 'build-notifier'.
(address . 42481@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20200722214657.32591-2-ludo@gnu.org
* guix/scripts/archive.scm (guix-archive): Pass #:verbosity to
'build-notifier'.
* guix/scripts/build.scm (guix-build): Likewise.
* guix/scripts/copy.scm (guix-copy): Likewise.
* guix/scripts/deploy.scm (guix-deploy): Likewise.
* guix/scripts/environment.scm (guix-environment): Likewise.
* guix/scripts/pack.scm (guix-pack): Likewise.
* guix/scripts/package.scm (guix-package*): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
* guix/scripts/system.scm (verbosity-level): New procedure.
(process-action): Pass #:verbosity to 'build-notifier'.
(guix-system): Use 'verbosity-level' for 'with-status-verbosity'.
---
guix/scripts/archive.scm | 2 ++
guix/scripts/build.scm | 2 ++
guix/scripts/copy.scm | 2 ++
guix/scripts/deploy.scm | 4 +++-
guix/scripts/environment.scm | 2 ++
guix/scripts/pack.scm | 2 ++
guix/scripts/package.scm | 2 ++
guix/scripts/pull.scm | 2 ++
guix/scripts/system.scm | 11 +++++++++--
9 files changed, 26 insertions(+), 3 deletions(-)

Toggle diff (144 lines)
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index 41a2a42c21..f3b86fba14 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -380,6 +380,8 @@ output port."
(with-build-handler
(build-notifier #:use-substitutes?
(assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:dry-run?
(assoc-ref opts 'dry-run?))
(cond ((assoc-ref opts 'export)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 8ff2fd1910..6286a43c02 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -961,6 +961,8 @@ needed."
(with-build-handler (build-notifier #:use-substitutes?
(assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:dry-run?
(assoc-ref opts 'dry-run?))
(parameterize ((current-terminal-columns (terminal-columns))
diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm
index f6f64d0a11..16d2de30f7 100644
--- a/guix/scripts/copy.scm
+++ b/guix/scripts/copy.scm
@@ -175,6 +175,8 @@ Copy ITEMS to or from the specified host over SSH.\n"))
(set-build-options-from-command-line store opts)
(with-build-handler (build-notifier #:use-substitutes?
(assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:dry-run?
(assoc-ref opts 'dry-run?))
(with-status-verbosity (assoc-ref opts 'verbosity)
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 4466a0c632..524067e989 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -150,7 +150,9 @@ Perform the deployment specified by FILE.\n"))
(with-store store
(set-build-options-from-command-line store opts)
(with-build-handler (build-notifier #:use-substitutes?
- (assoc-ref opts 'substitutes?))
+ (assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity))
(parameterize ((%graft? (assq-ref opts 'graft?)))
(map/accumulate-builds store
(cut deploy-machine* store <>)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index d3b8b57ccc..b8979cac19 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -708,6 +708,8 @@ message if any test fails."
(with-store store
(with-build-handler (build-notifier #:use-substitutes?
(assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:dry-run?
(assoc-ref opts 'dry-run?))
(with-status-verbosity (assoc-ref opts 'verbosity)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 13ade37515..8d9733d911 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1133,6 +1133,8 @@ Create a bundle of PACKAGE.\n"))
(with-build-handler (build-notifier #:dry-run?
(assoc-ref opts 'dry-run?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:use-substitutes?
(assoc-ref opts 'substitutes?))
(parameterize ((%graft? (assoc-ref opts 'graft?))
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 1246147798..ac8dedb5f3 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -965,6 +965,8 @@ option processing with 'parse-command-line'."
(set-build-options-from-command-line (%store) opts)
(with-build-handler (build-notifier #:use-substitutes?
(assoc-ref opts 'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:dry-run?
(assoc-ref opts 'dry-run?))
(parameterize ((%guile-for-build
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 807daec593..5b4ccf13fe 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -773,6 +773,8 @@ Use '~/.config/guix/channels.scm' instead."))
(%graft? (assoc-ref opts 'graft?)))
(with-build-handler (build-notifier #:use-substitutes?
substitutes?
+ #:verbosity
+ (assoc-ref opts 'verbosity)
#:dry-run? dry-run?)
(set-build-options-from-command-line store opts)
(ensure-default-profile)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index f2b4367094..3a8443b86c 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1057,6 +1057,12 @@ Some ACTIONS support additional ARGS.\n"))
(image-size . guess)
(install-bootloader? . #t)))
+(define (verbosity-level opts)
+ "Return the verbosity level based on OPTS, the alist of parsed options."
+ (or (assoc-ref opts 'verbosity)
+ (if (eq? (assoc-ref opts 'action) 'build)
+ 2 1)))
+
;;;
;;; Entry point.
@@ -1116,6 +1122,8 @@ resulting from command-line parsing."
(with-build-handler (build-notifier #:use-substitutes?
(assoc-ref opts 'substitutes?)
+ #:verbosity
+ (verbosity-level opts)
#:dry-run?
(assoc-ref opts 'dry-run?))
(run-with-store store
@@ -1270,8 +1278,7 @@ argument list and OPTS is the option alist."
(args (option-arguments opts))
(command (assoc-ref opts 'action)))
(parameterize ((%graft? (assoc-ref opts 'graft?)))
- (with-status-verbosity (or (assoc-ref opts 'verbosity)
- (if (eq? command 'build) 2 1))
+ (with-status-verbosity (verbosity-level opts)
(process-command command args opts))))))
;;; Local Variables:
--
2.27.0
L
L
Ludovic Courtès wrote on 31 Jul 2020 18:34
Re: [bug#42481] [PATCH 0/2] Printing a more concise build plan
(address . 42481@debbugs.gnu.org)
87y2mzskwm.fsf@gnu.org
Hello Guix!

Thoughts on this change?

I think it’s a good idea but I’d be happy to hear what people think!


Ludo’.

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (107 lines)
> Hello Guix!
>
> These patches implement a suggestion Pierre made a while back:
> showing by default fewer details about what will/would be built
> or downloaded, and omitting info about grafts and hooks.
>
> The verbosity level here is controlled via the existing
> ‘--verbosity’ or ‘-v’ flag (which thus now control two things).
>
> Here are examples of the result:
>
> $ ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl -n --no-grafts
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> The following derivations would be built:
> /gnu/store/y2inlprxbigqvknm5qwjwsqgljxfbri4-disk-image.drv
> /gnu/store/gclxh7i8smp71hz0p7wcj6qkf377wigy-image-dir.drv
> /gnu/store/21fin1j5pnjzfwbc70wdpzl3iyjym8xp-genimage.cfg.drv
> /gnu/store/aqcziad6ghfaainjibpdfypc8m2rr1vm-partition.img.drv
> /gnu/store/484d4fd9q9827bc09ia8bi1dgxl8gpwn-grub.cfg.drv
> /gnu/store/nnldmy339w9xxnybir48w14yz2xk0pmx-system.drv
>
> [...]
>
> /gnu/store/ddxz08xvasphckdralifb624y3c7hrkx-rc.drv
> /gnu/store/kq9qvn0m063m02cxf4kjipkf6x8vbvip-profile.drv
> /gnu/store/y9if6nrykcqfnzxvb4cci2nzhmz1ipx5-parameters.drv
> /gnu/store/w09j0p6126qcacylb455m5dn008yi04g-module-import.drv
> 49.9 MB would be downloaded
>
>
> Same with grafts:
>
> $ ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl -n
> 36.2 MB would be downloaded
>
>
> With ‘guix package’:
>
> $ ./pre-inst-env guix install vim-full krita -n
> The following packages would be installed:
> vim-full 8.2.1145
> krita 4.2.9
>
> 76.9 MB would be downloaded
> $ ./pre-inst-env guix install vim-full krita -n --no-grafts
> The following packages would be installed:
> vim-full 8.2.1145
> krita 4.2.9
>
> The following derivation would be built:
> /gnu/store/shf0anw8l0y9hg4l8qp1fym4bvwq5kh9-profile.drv
> 76.9 MB would be downloaded
> $ ./pre-inst-env guix install inkscape hugin -n
> The following package would be upgraded:
> inkscape (dependencies or package changed)
>
> The following package would be installed:
> hugin 2019.2.0
>
> The following derivation would be built:
> /gnu/store/lsi56ap8lzchfy8y76y7wirzfiqvb3ca-hugin-2019.2.0.drv
> 46.2 MB would be downloaded
>
>
> The current behavior is obtain with ‘-v2’, which remains the
> default for ‘guix build’:
>
> $ ./pre-inst-env guix build inkscape hugin -n
> The following derivation would be built:
> /gnu/store/lsi56ap8lzchfy8y76y7wirzfiqvb3ca-hugin-2019.2.0.drv
> 46.2 MB would be downloaded:
> /gnu/store/3jvjmwm0srgxxjwngv28bif8l4ksfbnp-autotrace-0.40.0-20190624.59
> /gnu/store/gg36g9h2nzmq4dzrcr21ndb09nybqys0-inkscape-1.0
> /gnu/store/n94n0ggdhck5a2prsd1r468x3p6i68p4-enblend-enfuse-4.2
> /gnu/store/89rj5fqcg48afgk99639ds602pgf92k4-cmake-minimal-3.16.5
> /gnu/store/0i4h5cf1a71pj319svzz88g2z07cvdk3-wxwidgets-3.0.5.1
> /gnu/store/bwz9f0lg9lxscj6jfcgxmzqng3s1f1n3-vigra-1.11.1
>
> It’s also possible to use ‘-v0’ now.
>
> How does that sound?
>
> Personally, I’m find it a bit disconcerting that so few is displayed
> when substitutes are available, but it also feels more “lightweight”
> this way. I really like that what would be built appears clearly,
> whereas now you have to scroll up possibly several pages to find
> that info, especially upon ‘guix upgrade’.
>
> Feedback welcome!
>
> Ludo’.
>
> Ludovic Courtès (2):
> ui: Add #:verbosity to 'show-what-to-build'.
> scripts: Pass #:verbosity to 'build-notifier'.
>
> guix/scripts/archive.scm | 2 +
> guix/scripts/build.scm | 2 +
> guix/scripts/copy.scm | 2 +
> guix/scripts/deploy.scm | 4 +-
> guix/scripts/environment.scm | 2 +
> guix/scripts/pack.scm | 2 +
> guix/scripts/package.scm | 2 +
> guix/scripts/pull.scm | 2 +
> guix/scripts/system.scm | 11 ++-
> guix/ui.scm | 175 ++++++++++++++++++++++-------------
> 10 files changed, 135 insertions(+), 69 deletions(-)
M
M
Mathieu Othacehe wrote on 31 Jul 2020 20:18
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 42481@debbugs.gnu.org)
87wo2jlf9x.fsf@gnu.org
Hey Ludo,

Toggle quote (4 lines)
> Thoughts on this change?
>
> I think it’s a good idea but I’d be happy to hear what people think!

Most of the times, I'm reading the build plan only for one purpose, stop
the command if I'm going to build (too many) things.

Trying to think more like a newcomer (recent DistroTube video helps in that
matter), I feel like information such as grafts and profile hooks are
way too low level.

So this serie looks really fine to me.

Small digression, something that troubles me in the aforementioned video
is that many things were apparently built. I don't know if besides
improving our CI, we could do other things, such as warn with more
insistence if the Guix version is too old?

Thanks,

Mathieu
M
M
Marius Bakke wrote on 31 Jul 2020 21:03
87mu3fpkvd.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (8 lines)
> Hello Guix!
>
> Thoughts on this change?
>
> I think it’s a good idea but I’d be happy to hear what people think!
>
> https://issues.guix.gnu.org/42481

I think it looks great. It's good that 'guix build' retains the
previous verbosity, and that 'guix upgrade' et.al still prints the
profile derivation, but omits the uninteresting stuff. LGTM!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl8kaxYACgkQoqBt8qM6
VPp62ggAiS7N0yxXSuiFfhyP1rA47F7LY7r4trtWn1eTOyv6HFXVW8vNfQ7xbn7p
whwsrlj7OG2YZ0Fo5825lR0wZ+Dw6kn3Q4jEQmoTXs5yKU9OJvzf0619wNjgQW44
fAyJi/YU4xWAn8PwLgZjG+wE+2RCkMWzkmcFa/3BVk37lEXV27gJwszNcNEkyH16
ScU+2+N+vlZFPyBhlattzRz7ktu0PdIjISERGyip7ePhrb2toZHErpqZMJCqtA2+
aEfY2R29/JFabZyu3+X8KE3IWMkvjFbjA8UhW+Zo2rrJzWmUVDtr0ib88q8MJh6k
hewQD7wzGzGWa7R64n3vqKhD63QwFg==
=DGtV
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 3 Aug 2020 17:49
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 42481@debbugs.gnu.org)
877dufspa2.fsf@gnu.org
Hi!

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (7 lines)
> Most of the times, I'm reading the build plan only for one purpose, stop
> the command if I'm going to build (too many) things.
>
> Trying to think more like a newcomer (recent DistroTube video helps in that
> matter), I feel like information such as grafts and profile hooks are
> way too low level.

Yeah, that’s also my feeling.

Marius Bakke <marius@gnu.org> skribis:

Toggle quote (4 lines)
> I think it looks great. It's good that 'guix build' retains the
> previous verbosity, and that 'guix upgrade' et.al still prints the
> profile derivation, but omits the uninteresting stuff. LGTM!

Alright, pushed as 898e6d0a07e4260600d0876d8d1f551ac8b647f9, thanks!

Ludo’.
L
L
Ludovic Courtès wrote on 3 Aug 2020 17:49
control message for bug #42481
(address . control@debbugs.gnu.org)
875z9zsp9t.fsf@gnu.org
tags 42481 fixed
close 42481
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 42481@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 42481
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch