GNU bug report logs - #42481
[PATCH 0/2] Printing a more concise build plan

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Ludovic Courtès <ludo@HIDDEN>; Keywords: fixed patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug closed, send any further explanations to 42481 <at> debbugs.gnu.org and Ludovic Courtès <ludo@HIDDEN> Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 42481 <at> debbugs.gnu.org:


Received: (at 42481) by debbugs.gnu.org; 3 Aug 2020 15:49:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 03 11:49:45 2020
Received: from localhost ([127.0.0.1]:45895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k2cia-0002xf-T5
	for submit <at> debbugs.gnu.org; Mon, 03 Aug 2020 11:49:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1k2ciV-0002xI-By
 for 42481 <at> debbugs.gnu.org; Mon, 03 Aug 2020 11:49:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44249)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1k2ciP-00007C-W7
 for 42481 <at> debbugs.gnu.org; Mon, 03 Aug 2020 11:49:30 -0400
Received: from [2a01:e35:2ffd:930:68c2:32f7:f96f:b343] (port=51650 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1k2ciO-0005go-En; Mon, 03 Aug 2020 11:49:28 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Mathieu Othacehe <othacehe@HIDDEN>
Subject: Re: [bug#42481] [PATCH 0/2] Printing a more concise build plan
References: <20200722214018.32353-1-ludo@HIDDEN> <87y2mzskwm.fsf@HIDDEN>
 <87wo2jlf9x.fsf@HIDDEN>
Date: Mon, 03 Aug 2020 17:49:25 +0200
In-Reply-To: <87wo2jlf9x.fsf@HIDDEN> (Mathieu Othacehe's message of "Fri, 31
 Jul 2020 20:18:18 +0200")
Message-ID: <877dufspa2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42481
Cc: 42481 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

Mathieu Othacehe <othacehe@HIDDEN> skribis:

> 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 th=
at
> matter), I feel like information such as grafts and profile hooks are
> way too low level.

Yeah, that=E2=80=99s also my feeling.

Marius Bakke <marius@HIDDEN> skribis:

> 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=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.

Message received at 42481 <at> debbugs.gnu.org:


Received: (at 42481) by debbugs.gnu.org; 31 Jul 2020 19:04:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 31 15:04:33 2020
Received: from localhost ([127.0.0.1]:38643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k1aKT-00043P-A4
	for submit <at> debbugs.gnu.org; Fri, 31 Jul 2020 15:04:33 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55992)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <marius@HIDDEN>) id 1k1aKN-000438-Ae
 for 42481 <at> debbugs.gnu.org; Fri, 31 Jul 2020 15:04:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48173)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <marius@HIDDEN>)
 id 1k1aKH-000226-6o; Fri, 31 Jul 2020 15:04:17 -0400
Received: from ti0006q161-3115.bb.online.no ([88.95.106.80]:50256
 helo=localhost)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <marius@HIDDEN>)
 id 1k1aKG-0002In-MY; Fri, 31 Jul 2020 15:04:16 -0400
From: Marius Bakke <marius@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 42481 <at> debbugs.gnu.org
Subject: Re: [bug#42481] [PATCH 0/2] Printing a more concise build plan
In-Reply-To: <87y2mzskwm.fsf@HIDDEN>
References: <20200722214018.32353-1-ludo@HIDDEN> <87y2mzskwm.fsf@HIDDEN>
Date: Fri, 31 Jul 2020 21:03:50 +0200
Message-ID: <87mu3fpkvd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42481
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hello Guix!
>
> Thoughts on this change?
>
> I think it=E2=80=99s a good idea but I=E2=80=99d be happy to hear what pe=
ople 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!

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----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-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.

Message received at 42481 <at> debbugs.gnu.org:


Received: (at 42481) by debbugs.gnu.org; 31 Jul 2020 18:18:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 31 14:18:33 2020
Received: from localhost ([127.0.0.1]:38583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k1Zc1-0002u2-9O
	for submit <at> debbugs.gnu.org; Fri, 31 Jul 2020 14:18:33 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1k1Zbx-0002tm-IL
 for 42481 <at> debbugs.gnu.org; Fri, 31 Jul 2020 14:18:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47615)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <othacehe@HIDDEN>)
 id 1k1Zbr-00052B-EE; Fri, 31 Jul 2020 14:18:23 -0400
Received: from [2a01:cb18:832e:5f00:c08f:7d21:ea98:a1c5] (port=53468
 helo=cervin)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <othacehe@HIDDEN>)
 id 1k1Zbp-0007sz-Hj; Fri, 31 Jul 2020 14:18:21 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#42481] [PATCH 0/2] Printing a more concise build plan
References: <20200722214018.32353-1-ludo@HIDDEN> <87y2mzskwm.fsf@HIDDEN>
Date: Fri, 31 Jul 2020 20:18:18 +0200
In-Reply-To: <87y2mzskwm.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Fri, 31 Jul 2020 18:34:49 +0200")
Message-ID: <87wo2jlf9x.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42481
Cc: 42481 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


Hey Ludo,

> Thoughts on this change?
>
> I think it=E2=80=99s a good idea but I=E2=80=99d be happy to hear what pe=
ople 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




Information forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.

Message received at 42481 <at> debbugs.gnu.org:


Received: (at 42481) by debbugs.gnu.org; 31 Jul 2020 16:35:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 31 12:35:04 2020
Received: from localhost ([127.0.0.1]:38533 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k1Xzr-0000Uv-R7
	for submit <at> debbugs.gnu.org; Fri, 31 Jul 2020 12:35:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1k1Xzn-0000UL-9U
 for 42481 <at> debbugs.gnu.org; Fri, 31 Jul 2020 12:35:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46240)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1k1Xzi-0000vR-1U
 for 42481 <at> debbugs.gnu.org; Fri, 31 Jul 2020 12:34:54 -0400
Received: from [2a01:e35:2ffd:930:68c2:32f7:f96f:b343] (port=49026 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1k1Xzg-0008IN-9a
 for 42481 <at> debbugs.gnu.org; Fri, 31 Jul 2020 12:34:53 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 42481 <at> debbugs.gnu.org
Subject: Re: [bug#42481] [PATCH 0/2] Printing a more concise build plan
References: <20200722214018.32353-1-ludo@HIDDEN>
Date: Fri, 31 Jul 2020 18:34:49 +0200
In-Reply-To: <20200722214018.32353-1-ludo@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Cou\?\= \=\?utf-8\?Q\?rt\=C3\=A8s\=22's\?\=
 message of "Wed, 22 Jul 2020 23:40:18 +0200")
Message-ID: <87y2mzskwm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42481
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello Guix!

Thoughts on this change?

I think it=E2=80=99s a good idea but I=E2=80=99d be happy to hear what peop=
le think!

  https://issues.guix.gnu.org/42481

Ludo=E2=80=99.

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> 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
> =E2=80=98--verbosity=E2=80=99 or =E2=80=98-v=E2=80=99 flag (which thus no=
w control two things).
>
> Here are examples of the result:
>
> $ ./pre-inst-env guix system disk-image --target=3Di586-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=3Di586-pc-gnu gnu/system=
/examples/bare-hurd.tmpl -n
> 36.2 MB would be downloaded
>
>
> With =E2=80=98guix package=E2=80=99:
>
> $ ./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 =E2=80=98-v2=E2=80=99, which remains =
the
> default for =E2=80=98guix build=E2=80=99:
>
> $ ./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=E2=80=99s also possible to use =E2=80=98-v0=E2=80=99 now.
>
> How does that sound?
>
> Personally, I=E2=80=99m find it a bit disconcerting that so few is displa=
yed
> when substitutes are available, but it also feels more =E2=80=9Clightweig=
ht=E2=80=9D
> 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 =E2=80=98guix upgrade=E2=80=99.
>
> Feedback welcome!
>
> Ludo=E2=80=99.
>
> Ludovic Court=C3=A8s (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(-)




Information forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.

Message received at 42481 <at> debbugs.gnu.org:


Received: (at 42481) by debbugs.gnu.org; 22 Jul 2020 21:47:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 22 17:47:19 2020
Received: from localhost ([127.0.0.1]:43283 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jyMa7-0006op-9g
	for submit <at> debbugs.gnu.org; Wed, 22 Jul 2020 17:47:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34796)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jyMa3-0006oM-GJ
 for 42481 <at> debbugs.gnu.org; Wed, 22 Jul 2020 17:47:15 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56759)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jyMZy-00082q-6r; Wed, 22 Jul 2020 17:47:10 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59932 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1jyMZw-0001mO-Pv; Wed, 22 Jul 2020 17:47:09 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 42481 <at> debbugs.gnu.org
Subject: [PATCH 2/2] scripts: Pass #:verbosity to 'build-notifier'.
Date: Wed, 22 Jul 2020 23:46:57 +0200
Message-Id: <20200722214657.32591-2-ludo@HIDDEN>
X-Mailer: git-send-email 2.27.0
In-Reply-To: <20200722214657.32591-1-ludo@HIDDEN>
References: <20200722214657.32591-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42481
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* 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(-)

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





Information forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.

Message received at 42481 <at> debbugs.gnu.org:


Received: (at 42481) by debbugs.gnu.org; 22 Jul 2020 21:47:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 22 17:47:17 2020
Received: from localhost ([127.0.0.1]:43281 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jyMa4-0006og-Q9
	for submit <at> debbugs.gnu.org; Wed, 22 Jul 2020 17:47:17 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34788)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jyMa2-0006oK-CD
 for 42481 <at> debbugs.gnu.org; Wed, 22 Jul 2020 17:47:14 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56758)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jyMZw-00082c-Jl; Wed, 22 Jul 2020 17:47:08 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59932 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1jyMZv-0001mO-D7; Wed, 22 Jul 2020 17:47:07 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 42481 <at> debbugs.gnu.org
Subject: [PATCH 1/2] ui: Add #:verbosity to 'show-what-to-build'.
Date: Wed, 22 Jul 2020 23:46:56 +0200
Message-Id: <20200722214657.32591-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.27.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 42481
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

* 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(-)

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





Information forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Jul 2020 21:40:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 22 17:40:29 2020
Received: from localhost ([127.0.0.1]:43271 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jyMTV-0006cg-KZ
	for submit <at> debbugs.gnu.org; Wed, 22 Jul 2020 17:40:29 -0400
Received: from lists.gnu.org ([209.51.188.17]:55354)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jyMTS-0006cX-Lh
 for submit <at> debbugs.gnu.org; Wed, 22 Jul 2020 17:40:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55154)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1jyMTS-0005l7-Ez
 for guix-patches@HIDDEN; Wed, 22 Jul 2020 17:40:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56634)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jyMTR-0006zk-F5; Wed, 22 Jul 2020 17:40:25 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59918 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82)
 (envelope-from <ludo@HIDDEN>)
 id 1jyMTQ-0001Jz-Lk; Wed, 22 Jul 2020 17:40:24 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/2] Printing a more concise build plan
Date: Wed, 22 Jul 2020 23:40:18 +0200
Message-Id: <20200722214018.32353-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.27.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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:

--8<---------------cut here---------------start------------->8---
$ ./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
--8<---------------cut here---------------end--------------->8---

Same with grafts:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix system disk-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl -n
36.2 MB would be downloaded
--8<---------------cut here---------------end--------------->8---

With ‘guix package’:

--8<---------------cut here---------------start------------->8---
$ ./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
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
$ ./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
--8<---------------cut here---------------end--------------->8---

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





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#42481; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 3 Aug 2020 16:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.