GNU bug report logs - #33673
"guix system --help" does not detail how to use --on-error=strategy

Previous Next

Package: guix;

Reported by: swedebugia <at> riseup.net

Date: Sat, 8 Dec 2018 08:32:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

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 33673 in the body.
You can then email your comments to 33673 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 bug-guix <at> gnu.org:
bug#33673; Package guix. (Sat, 08 Dec 2018 08:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to swedebugia <at> riseup.net:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 08 Dec 2018 08:32:02 GMT) Full text and rfc822 format available.

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

From: swedebugia <at> riseup.net
To: bug-guix <at> gnu.org
Subject: "guix system --help" does not detail how to use --on-error=strategy
Date: Sat, 08 Dec 2018 00:30:54 -0800
Hi

The current output is:

--on-error=STRATEGY    apply STRATEGY when an error occurs while reading
FILE

Also the manual currently lacks a cindex for on-error (I had to search
with 's' through multiple false positives to find the relevant section)

Additionally we now have so many commands in the help pages of guix
system and guix build that it would be nice to present them in a more
readable/categorized way.

Would a patches for improvement in these areas be accepted?

-- 
Cheers 
Swedebugia

-------- Original Message --------
Subject: Re: error: rmdir: Device or resource busy
Date: 2018-12-08 09:24
From: swedebugia <at> riseup.net
To: Fredrik Salomonsson <plattfot <at> gmail.com>
Cc: help-guix <help-guix <at> gnu.org>, Help-Guix
<help-guix-bounces+swedebugia=riseup.net <at> gnu.org>

Hej!

On 2018-12-08 09:05, Fredrik Salomonsson wrote:
> Hello,
> 
> tried installing GuixSD 0.16. But hitting a cryptic error.
> 
> guix system init /mnt/etc/config.scm /mnt
> --substitute-urls="http://berlin.guixsd.org http://mirror.hydra.gnu.org"
> ...
> /gnu/store/sh9x3mhl5q60yxhl861kpk6vm70l3w81-bootloader-installer
> 
> initializing operating system under '/mnt'...
> guix system: error: rmdir: Device or resource busy
> 
> This was working fine with 0.15.
> 
> Is there a way to get a better backtrace from system init? 

Yes!

From the manual: 
'--on-error=STRATEGY'
     Apply STRATEGY when an error occurs when reading FILE.  STRATEGY
     may be one of the following:

     'nothing-special'
          Report the error concisely and exit.  This is the default
          strategy.

     'backtrace'
          Likewise, but also display a backtrace.

     'debug'
          Report the error and enter Guile's debugger.  From there, you
          can run commands such as ',bt' to get a backtrace, ',locals'
          to display local variable values, and more generally inspect
          the state of the program.  *Note (guile)Debug Commands::, for
          a list of available debugging commands.

Actually the --help to "guix system" hints about this but it is not
telling how to use it, which is a bug I think. (i'm going to report it
and send a patch)

> Or does anyone
> know what the error might be?

I never saw it before.




Information forwarded to bug-guix <at> gnu.org:
bug#33673; Package guix. (Sat, 08 Dec 2018 23:17:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: swedebugia <at> riseup.net
Cc: 33673 <at> debbugs.gnu.org
Subject: Re: bug#33673: "guix system --help" does not detail how to use
 --on-error=strategy
Date: Sun, 09 Dec 2018 00:16:47 +0100
Hi,

swedebugia <at> riseup.net skribis:

> The current output is:
>
> --on-error=STRATEGY    apply STRATEGY when an error occurs while reading
> FILE

FWIW I think it’s reasonable for ‘--help’ to be generally more concise
than the manual.  We could list the possible strategies here, but that
might clutter the output more than is desirable.

> Additionally we now have so many commands in the help pages of guix
> system and guix build that it would be nice to present them in a more
> readable/categorized way.
>
> Would a patches for improvement in these areas be accepted?

Improvements are always welcome of course.  The main criterion would be
to remain consistent with the rest of Guix and with GNU conventions that
we follow.  Maybe it’s best to discuss what you have in mind first?

Thank you,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#33673; Package guix. (Tue, 11 Dec 2018 07:20:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: swedebugia <at> riseup.net, 33673 <at> debbugs.gnu.org
Subject: Re: bug#33673: "guix system --help" does not detail how to use
 --on-error=strategy
Date: Tue, 11 Dec 2018 09:18:51 +0200
[Message part 1 (text/plain, inline)]
On Sun, Dec 09, 2018 at 12:16:47AM +0100, Ludovic Courtès wrote:
> Hi,
> 
> swedebugia <at> riseup.net skribis:
> 
> > The current output is:
> >
> > --on-error=STRATEGY    apply STRATEGY when an error occurs while reading
> > FILE
> 
> FWIW I think it’s reasonable for ‘--help’ to be generally more concise
> than the manual.  We could list the possible strategies here, but that
> might clutter the output more than is desirable.
> 
> > Additionally we now have so many commands in the help pages of guix
> > system and guix build that it would be nice to present them in a more
> > readable/categorized way.
> >
> > Would a patches for improvement in these areas be accepted?
> 
> Improvements are always welcome of course.  The main criterion would be
> to remain consistent with the rest of Guix and with GNU conventions that
> we follow.  Maybe it’s best to discuss what you have in mind first?
> 
> Thank you,
> Ludo’.
> 

I'd go with (one of: nothing-special, backtrace, debug)
with the assumption that for more information the manual is more
verbose.

I also just noticed that we have 'man guix-system', which could be more
verbose on the subject without needing to fit in a concise output.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#33673; Package guix. (Tue, 11 Dec 2018 07:28:02 GMT) Full text and rfc822 format available.

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

From: swedebugia <at> riseup.net
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 33673 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#33673: "guix system --help" does not detail how to use
 --on-error=strategy
Date: Mon, 10 Dec 2018 23:27:48 -0800
On 2018-12-11 08:18, Efraim Flashner wrote:
> On Sun, Dec 09, 2018 at 12:16:47AM +0100, Ludovic Courtès wrote:
>> Hi,
>>
>> swedebugia <at> riseup.net skribis:
>>
>> > The current output is:
>> >
>> > --on-error=STRATEGY    apply STRATEGY when an error occurs while reading
>> > FILE
>>
>> FWIW I think it’s reasonable for ‘--help’ to be generally more concise
>> than the manual.  We could list the possible strategies here, but that
>> might clutter the output more than is desirable.
>>
>> > Additionally we now have so many commands in the help pages of guix
>> > system and guix build that it would be nice to present them in a more
>> > readable/categorized way.
>> >
>> > Would a patches for improvement in these areas be accepted?
>>
>> Improvements are always welcome of course.  The main criterion would be
>> to remain consistent with the rest of Guix and with GNU conventions that
>> we follow.  Maybe it’s best to discuss what you have in mind first?
>>
>> Thank you,
>> Ludo’.
>>
> 
> I'd go with (one of: nothing-special, backtrace, debug)
> with the assumption that for more information the manual is more
> verbose.

Sounds good to me. Clutter is a problem we already have it seems so lets
not make it worse.

> 
> I also just noticed that we have 'man guix-system', which could be more
> verbose on the subject without needing to fit in a concise output.

Where do I edit this man-page?

-- 
Cheers 
Swedebugia




Information forwarded to bug-guix <at> gnu.org:
bug#33673; Package guix. (Tue, 11 Dec 2018 17:11:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: swedebugia <at> riseup.net, 33673 <at> debbugs.gnu.org
Subject: Re: bug#33673: "guix system --help" does not detail how to use
 --on-error=strategy
Date: Tue, 11 Dec 2018 18:10:06 +0100
Hi!

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> On Sun, Dec 09, 2018 at 12:16:47AM +0100, Ludovic Courtès wrote:

[...]

>> Improvements are always welcome of course.  The main criterion would be
>> to remain consistent with the rest of Guix and with GNU conventions that
>> we follow.  Maybe it’s best to discuss what you have in mind first?
>> 
>> Thank you,
>> Ludo’.
>> 
>
> I'd go with (one of: nothing-special, backtrace, debug)
> with the assumption that for more information the manual is more
> verbose.

Sounds good to me.  Would you like to send a patch?

> I also just noticed that we have 'man guix-system', which could be more
> verbose on the subject without needing to fit in a concise output.

Manual pages are generated from the ‘--help’ output, the canonical
documentation being the Info manual.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#33673; Package guix. (Fri, 14 Dec 2018 18:54:02 GMT) Full text and rfc822 format available.

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

From: swedebugia <swedebugia <at> riseup.net>
To: guix-patches <at> gnu.org
Subject: PATCH: Fwd: Re: bug#33673: "guix system --help" does not detail how
 to use --on-error=strategy
Date: Fri, 14 Dec 2018 19:52:59 +0100
[Message part 1 (text/plain, inline)]
Is this patch ok?


-------- Forwarded Message --------
Subject: Re: bug#33673: "guix system --help" does not detail how to use 
--on-error=strategy
Date: Tue, 11 Dec 2018 18:10:06 +0100
From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
CC: swedebugia <at> riseup.net, 33673 <at> debbugs.gnu.org

Hi!

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> On Sun, Dec 09, 2018 at 12:16:47AM +0100, Ludovic Courtès wrote:

[...]

>> Improvements are always welcome of course.  The main criterion would be
>> to remain consistent with the rest of Guix and with GNU conventions that
>> we follow.  Maybe it’s best to discuss what you have in mind first?
>> 
>> Thank you,
>> Ludo’.
>> 
>
> I'd go with (one of: nothing-special, backtrace, debug)
> with the assumption that for more information the manual is more
> verbose.

Sounds good to me.  Would you like to send a patch?

> I also just noticed that we have 'man guix-system', which could be more
> verbose on the subject without needing to fit in a concise output.

Manual pages are generated from the ‘--help’ output, the canonical
documentation being the Info manual.

Thanks,
Ludo’.
[0001-system-Clarify-the-three-strategies-available.patch (text/x-patch, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 18 Dec 2018 10:55:02 GMT) Full text and rfc822 format available.

Notification sent to swedebugia <at> riseup.net:
bug acknowledged by developer. (Tue, 18 Dec 2018 10:55:02 GMT) Full text and rfc822 format available.

Message #25 received at 33673-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: swedebugia <swedebugia <at> riseup.net>
Cc: 33673-done <at> debbugs.gnu.org
Subject: Re: bug#33673: PATCH: Fwd: Re: bug#33673: "guix system --help" does
 not detail how to use --on-error=strategy
Date: Tue, 18 Dec 2018 11:54:22 +0100
Hello,

swedebugia <swedebugia <at> riseup.net> skribis:

> From e71273a1b3b20bba8f4174ac4b98925bbc36ac0d Mon Sep 17 00:00:00 2001
> From: swedebugia <swedebugia <at> riseup.net>
> Date: Fri, 14 Dec 2018 19:41:41 +0100
> Subject: [PATCH] system: Clarify the three strategies available.
>
> * guix/scripts/system.scm (show-help): Clarify the three choices.
> * doc/guix.texi (Invoking guix system): Add 3 @cindex to make on-error=strategy
>   easier to find.
> ---
>  doc/guix.texi           | 3 +++
>  guix/scripts/system.scm | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 20b5013fd..4c204c619 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -22628,6 +22628,9 @@ appear in the @code{operating-system} declaration actually exist
>  needed at boot time are listed in @code{initrd-modules} (@pxref{Initial
>  RAM Disk}).  Passing this option skips these tests altogether.
>  
> +@cindex on-error
> +@cindex on-error strategy
> +@cindex error strategy
>  @item --on-error=@var{strategy}
>  Apply @var{strategy} when an error occurs when reading @var{file}.
>  @var{strategy} may be one of the following:
> diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
> index 8eb32c62b..d94917100 100644
> --- a/guix/scripts/system.scm
> +++ b/guix/scripts/system.scm
> @@ -993,7 +993,7 @@ Some ACTIONS support additional ARGS.\n"))
>                           instead of reading FILE, when applicable"))
>    (display (G_ "
>        --on-error=STRATEGY
> -                         apply STRATEGY when an error occurs while reading FILE"))
> +                         apply STRATEGY (one of: nothing-special, backtrace, debug) when an error occurs while reading FILE."))

I wrapped this line and applied it.

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 15 Jan 2019 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 103 days ago.

Previous Next


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