Subject: bug#33673: closed (Re: bug#33673: PATCH: Fwd: Re: bug#33673: "guix system --help" does not detail how to use --on-error=strategy)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 18 Dec 2018 10:55:02 +0000

Your bug report

#33673: "guix system --help" does not detail how to use --on-error=strategy

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
33673: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33673
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#33673: PATCH: Fwd: Re: bug#33673: "guix system --help" does not detail how to use --on-error=strategy
From: Ludovic Courtès <[email-masked]>
To: swedebugia <[email-masked]>
Cc: [email-masked]
Date: Tue, 18 Dec 2018 11:54:22 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

swedebugia <[email-masked]> skribis:

> From e71273a1b3b20bba8f4174ac4b98925bbc36ac0d Mon Sep 17 00:00:00 2001
> From: swedebugia <[email-masked]>
> 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’.

Subject: "guix system --help" does not detail how to use --on-error=strategy
From: [email-masked]
To: [email-masked]
Date: Sat, 08 Dec 2018 00:30:54 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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: [email-masked]
To: Fredrik Salomonsson <[email-masked]>
Cc: help-guix <[email-masked]>, Help-Guix
<help-guix-bounces+swedebugia=[email-masked]>

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.