[PATCH 1/2] size: Document that positional arguments can be store items.

DoneSubmitted by Pierre Neidhardt.
Details
3 participants
  • Ludovic Courtès
  • Pierre Neidhardt
  • zimoun
Owner
unassigned
Severity
normal
P
P
Pierre Neidhardt wrote on 26 May 15:38 +0200
(address . guix-patches@gnu.org)
20200526133830.4438-1-mail@ambrevar.xyz
* guix/scripts/size.scm (show-help): Mention STORE-ITEM positional argument alternative.--- guix/scripts/size.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Toggle diff (17 lines)diff --git a/guix/scripts/size.scm b/guix/scripts/size.scmindex 2446b84587..c42f4f7782 100644--- a/guix/scripts/size.scm+++ b/guix/scripts/size.scm@@ -230,8 +230,8 @@ the name of a PNG file." ;;; (define (show-help)- (display (G_ "Usage: guix size [OPTION]... PACKAGE-Report the size of PACKAGE and its dependencies.\n"))+ (display (G_ "Usage: guix size [OPTION]... PACKAGE|STORE-ITEM+Report the size of the PACKAGE or STORE-ITEM, with its dependencies.\n")) (display (G_ " --substitute-urls=URLS fetch substitute from URLS if they are authorized"))-- 2.26.2
P
P
Pierre Neidhardt wrote on 26 May 15:40 +0200
[PATCH 2/2] doc: Add example to calculate the size a system.
(address . 41539@debbugs.gnu.org)
20200526134041.6014-1-mail@ambrevar.xyz
* doc/guix.texi (Invoking `guix size'): Add guix size example for store item.--- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+)
Toggle diff (20 lines)diff --git a/doc/guix.texi b/doc/guix.texiindex 4dbbf96db9..0c4067b52e 100644--- a/doc/guix.texi+++ b/doc/guix.texi@@ -10110,6 +10110,13 @@ libraries. (That libc and GCC's libraries represent a large fraction of the closure is not a problem @i{per se} because they are always available on the system anyway.) +Since the command also accepts store file names, assessing the size of+a build result is straightforward:++@example+guix size $(guix system build config.scm)+@end example+ When the package(s) passed to @command{guix size} are available in the store@footnote{More precisely, @command{guix size} looks for the @emph{ungrafted} variant of the given package(s), as returned by-- 2.26.2
L
L
Ludovic Courtès wrote on 28 May 23:19 +0200
Re: [bug#41539] [PATCH 1/2] size: Document that positional arguments can be store items.
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 41539@debbugs.gnu.org)
87lflbahaz.fsf@gnu.org
Hi,
Pierre Neidhardt <mail@ambrevar.xyz> skribis:
Toggle quote (3 lines)> * guix/scripts/size.scm (show-help): Mention STORE-ITEM positional argument> alternative.
[...]
Toggle quote (2 lines)> * doc/guix.texi (Invoking `guix size'): Add guix size example for store item.
[...]
Toggle quote (3 lines)> +@example> +guix size $(guix system build config.scm)
Please use backquotes instead of $(…), which is Bash-specific.
Otherwise LGTM, thank you!
Ludo’.
P
P
Pierre Neidhardt wrote on 29 May 11:25 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 41539@debbugs.gnu.org)
87zh9rf5z8.fsf@ambrevar.xyz
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (18 lines)> Hi,>> Pierre Neidhardt <mail@ambrevar.xyz> skribis:>>> * guix/scripts/size.scm (show-help): Mention STORE-ITEM positional argument>> alternative.>> [...]>>> * doc/guix.texi (Invoking `guix size'): Add guix size example for store item.>> [...]>>> +@example>> +guix size $(guix system build config.scm)>> Please use backquotes instead of $(…), which is Bash-specific.
Actually, it's not, $(...) is POSIX (you can test with Dash).Backquotes are deprecated and have the downside of not nesting.
Toggle quote (2 lines)> Otherwise LGTM, thank you!
OK to merge, then?
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl7Q1PsACgkQm9z0l6S7zH/4vwf/ecja1h904WVCF4uq0f1gAMak15suquikaOcg1KDq+uslcMyTLZGC2FyveTaCrzOSU31QRifY05pKwHESoIzx/V1RoP7KCxnOsk9oJ3ZoDvZ9g4I/lypQVqeGzaSpyQzGB6/hS04NH98fW+i3R4sqUgcxURLN8Wh1QCE/hCE7fntngJyojPFuX2MoaH5Jlwm69AuBFdZ0IlGP009/H53Ez/0z0slGZ8oB0hATqz+0yOWsuSBdAuay6kdkeKqhtqWdbV2l/S9l3UyYYIxmti99XxpMeXTreDJ9SgdpjJKhYXkZTgUpZYJxgl5FaWU55m42JoNQBPwPMN4JQdRnREzTjg===U7DI-----END PGP SIGNATURE-----
Z
Z
zimoun wrote on 29 May 11:56 +0200
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
CAJ3okZ2ePQBOGv=mFtW1WU5Qn1HkhNpeMU0hZX_stGy1zD1xrg@mail.gmail.com
Dear,
On Fri, 29 May 2020 at 11:26, Pierre Neidhardt <mail@ambrevar.xyz> wrote:
Toggle quote (8 lines)> >> +@example> >> +guix size $(guix system build config.scm)> >> > Please use backquotes instead of $(…), which is Bash-specific.>> Actually, it's not, $(...) is POSIX (you can test with Dash).> Backquotes are deprecated and have the downside of not nesting.
Yes, $(...) is POSIX, AFAIK.And let quote what POSIX says: "Because of these inconsistentbehaviors, the backquoted variety of command substitution is notrecommended for new applications that nest command substitutions orattempt to embed complex scripts."
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03
(I do not know if it is the latest version of the document.)

Well, $(...) is already used in the manual. For example, X11 fontssection because of nested. But elsewhere not, see e.g., invoking guixarchive or Nteworking Services or Invoking guix system sections.
https://guix.gnu.org/manual/devel/en/guix.html#X11-Fontshttps://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-archivehttps://guix.gnu.org/manual/devel/en/guix.html#Networking-Serviceshttps://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-system
Therefore, only one should be used. And $(...) is better. So I wouldbe in favour to replace all the backquotes by $(...) in the manual.

All the best,simon
L
L
Ludovic Courtès wrote on 29 May 12:09 +0200
(name . zimoun)(address . zimon.toutoune@gmail.com)
87pnan3vdc.fsf@gnu.org
Hi,
zimoun <zimon.toutoune@gmail.com> skribis:
Toggle quote (18 lines)> On Fri, 29 May 2020 at 11:26, Pierre Neidhardt <mail@ambrevar.xyz> wrote:>>> >> +@example>> >> +guix size $(guix system build config.scm)>> >>> > Please use backquotes instead of $(…), which is Bash-specific.>>>> Actually, it's not, $(...) is POSIX (you can test with Dash).>> Backquotes are deprecated and have the downside of not nesting.>> Yes, $(...) is POSIX, AFAIK.> And let quote what POSIX says: "Because of these inconsistent> behaviors, the backquoted variety of command substitution is not> recommended for new applications that nest command substitutions or> attempt to embed complex scripts.">> https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03
I stand corrected! That’s news to me, but definitely good news.I’m all for using $(…) from now on.
Thank you!
Ludo’.
P
P
Pierre Neidhardt wrote on 29 May 18:56 +0200
(address . 41539@debbugs.gnu.org)
87sgfiel3c.fsf@ambrevar.xyz
Merged with 776409c5069de949da328b769132fa009477668c.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl7RPrcACgkQm9z0l6S7zH9kZggAq+JUtS3PusFaOPFR8so24LgAcBUH8WDKHqRCyVzVZUyOMur/vjyTVAeR4QAVSxdocdjqHrxAbVpPgLw4q1NoaS1vfJJbxgTGgLXPmxeYU/2q4HkSNwvru1igbDMfN3ufuS5Nn2XmArValkotWQkYN+eILeABTR2BUu+utf72fOir1T24psTC7HdvV1I0NUd5RQk8MQBACba35Nq31diOMj6X0ALINgefNMMvRa+K3nHuVldYCWKRlkAS5vWbdiUmglffzj13ej7cEJXui1jtRsCNWvm7uzjWWpgFDelpv6APkIjJpiFsqKW/D53UTgP8PzP3uAt5cnav2gJl9TFPHA===V1oI-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 29 May 18:56 +0200
control message for bug #41539
(address . control@debbugs.gnu.org)
87v9keel3u.fsf@ambrevar.xyz
close 41539 quit
?