bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26271: 'guix system' does not support common build option '--root'


From: Ludovic Courtès
Subject: bug#26271: 'guix system' does not support common build option '--root'
Date: Thu, 06 Apr 2017 10:23:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi,

Chris Marusich <address@hidden> skribis:

> In the attached patch series, I've mentioned '--root' in 'show-help'.
> However, since there is already a link in the '(guix) Invoking guix
> system)' section to the section which describes the common build options
> ((guix) Common Build Options), I decided not to duplicate the
> documentation for '--root' in that section.
>
> If you still think we should mention '--root' in '(guix) Invoking guix
> system)', let me know and I will submit another small patch to add it.

I decided to add --root under “Invoking guix system” because “Common
Build Options” doesn’t mention it.

> Now we can generate system images without fear of the reaper!  The
> garbage reaper, that is :-)

Heheh.  :-)

Note that previously the image could be GC’d only once ‘guix system’ had
completed.

> From 8b768570b26d9a44ea140b0cd29383d32d37a0df Mon Sep 17 00:00:00 2001
> From: Chris Marusich <address@hidden>
> Date: Tue, 4 Apr 2017 20:24:54 -0700
> Subject: [PATCH 1/2] build: Add and export procedure 'register-root*'.
>
> * guix/scripts/build.scm (register-root*): Add and export it.

Applied.

> From 430fdb321f3401d5a498f002291ae520d47f1dcf Mon Sep 17 00:00:00 2001
> From: Chris Marusich <address@hidden>
> Date: Mon, 3 Apr 2017 23:49:22 -0700
> Subject: [PATCH 2/2] system: Support the --root option in 'guix system'.
>
> Fixes <https://bugs.gnu.org/26271>.
>
> * guix/scripts/system.scm (perform-action): Add #:gc-root parameter and honor
>   it.
>   (show-help): Document the --root option.
>   (%options): Add 'root'.
>   (process-action): Pass 'root' option to perform-action as #:gc-root.

Applied with minor changes:

> @@ -665,8 +669,11 @@ building anything."
>                        #:grub.cfg (derivation->output-path grub.cfg)
>                        #:device device))
>              (else
> -             ;; All we had to do was to build SYS.
> -             (return (derivation->output-path sys))))))))
> +             ;; All we had to do was to build SYS and maybe register an
> +             ;; indirect GC root.
> +             (mwhen gc-root
> +               (register-root* (list (derivation->output-path sys))
> +                               gc-root))))))))

I changed it so that it would still return the output file name.

>    (display (_ "
> +  -r, --root=FILE        for 'vm', 'vm-image', 'disk-image', 'container',
> +                         and 'build', make FILE a symlink to the result, and
> +                         register it as a garbage collector root."))

I removed the period for consistency.

Thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]