GNU bug report logs - #41539
[PATCH 1/2] size: Document that positional arguments can be store items.

Previous Next

Package: guix-patches;

Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>

Date: Tue, 26 May 2020 13:39:01 UTC

Severity: normal

Tags: patch

Done: Pierre Neidhardt <mail <at> ambrevar.xyz>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41539 in the body.
You can then email your comments to 41539 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Tue, 26 May 2020 13:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 26 May 2020 13:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/2] size: Document that positional arguments can be store
 items.
Date: Tue, 26 May 2020 15:38:30 +0200
* guix/scripts/size.scm (show-help): Mention STORE-ITEM positional argument
  alternative.
---
 guix/scripts/size.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm
index 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





Information forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Tue, 26 May 2020 13:41:02 GMT) Full text and rfc822 format available.

Message #8 received at 41539 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 41539 <at> debbugs.gnu.org
Subject: [PATCH 2/2] doc: Add example to calculate the size a system.
Date: Tue, 26 May 2020 15:40:41 +0200
* doc/guix.texi (Invoking `guix size'): Add guix size example for store item.
---
 doc/guix.texi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 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 <at> footnote{More precisely, @command{guix size} looks for the
 @emph{ungrafted} variant of the given package(s), as returned by
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Thu, 28 May 2020 21:20:02 GMT) Full text and rfc822 format available.

Message #11 received at 41539 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 41539 <at> debbugs.gnu.org
Subject: Re: [bug#41539] [PATCH 1/2] size: Document that positional arguments
 can be store items.
Date: Thu, 28 May 2020 23:19:32 +0200
Hi,

Pierre Neidhardt <mail <at> 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.

Otherwise LGTM, thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Fri, 29 May 2020 09:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 41539 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 41539 <at> debbugs.gnu.org
Subject: Re: [bug#41539] [PATCH 1/2] size: Document that positional arguments
 can be store items.
Date: Fri, 29 May 2020 11:25:15 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Pierre Neidhardt <mail <at> 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.

> Otherwise LGTM, thank you!

OK to merge, then?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Fri, 29 May 2020 09:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 41539 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 41539 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#41539] [PATCH 1/2] size: Document that positional arguments
 can be store items.
Date: Fri, 29 May 2020 11:56:30 +0200
Dear,

On Fri, 29 May 2020 at 11:26, Pierre Neidhardt <mail <at> 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 do not know if it is the latest version of the document.)


Well, $(...) is already used in the manual.  For example, X11 fonts
section because of nested.  But elsewhere not, see e.g., invoking guix
archive or Nteworking Services or Invoking guix system sections.

https://guix.gnu.org/manual/devel/en/guix.html#X11-Fonts
https://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-archive
https://guix.gnu.org/manual/devel/en/guix.html#Networking-Services
https://guix.gnu.org/manual/devel/en/guix.html#Invoking-guix-system

Therefore, only one should be used.  And $(...) is better.  So I would
be in favour to replace all the backquotes by $(...) in the manual.


All the best,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Fri, 29 May 2020 10:11:01 GMT) Full text and rfc822 format available.

Message #20 received at 41539 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 41539 <at> debbugs.gnu.org, Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: Re: [bug#41539] [PATCH 1/2] size: Document that positional arguments
 can be store items.
Date: Fri, 29 May 2020 12:09:51 +0200
Hi,

zimoun <zimon.toutoune <at> gmail.com> skribis:

> On Fri, 29 May 2020 at 11:26, Pierre Neidhardt <mail <at> 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’.




Information forwarded to guix-patches <at> gnu.org:
bug#41539; Package guix-patches. (Fri, 29 May 2020 16:57:01 GMT) Full text and rfc822 format available.

Message #23 received at 41539 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>, zimoun
 <zimon.toutoune <at> gmail.com>
Cc: 41539 <at> debbugs.gnu.org
Subject: Re: [bug#41539] [PATCH 1/2] size: Document that positional arguments
 can be store items.
Date: Fri, 29 May 2020 18:56:23 +0200
[Message part 1 (text/plain, inline)]
Merged with 776409c5069de949da328b769132fa009477668c.
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 41539 <at> debbugs.gnu.org and Pierre Neidhardt <mail <at> ambrevar.xyz> Request was from Pierre Neidhardt <mail <at> ambrevar.xyz> to control <at> debbugs.gnu.org. (Fri, 29 May 2020 16:57:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 27 Jun 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 353 days ago.

Previous Next


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