unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Chris Marusich <cmmarusich@gmail.com>
Cc: 26271-done@debbugs.gnu.org
Subject: bug#26271: 'guix system' does not support common build option '--root'
Date: Thu, 06 Apr 2017 10:23:33 +0200	[thread overview]
Message-ID: <87vaqiymey.fsf@gnu.org> (raw)
In-Reply-To: <87wpayf22a.fsf@gmail.com> (Chris Marusich's message of "Thu, 06 Apr 2017 00:05:49 -0700")

Hi,

Chris Marusich <cmmarusich@gmail.com> 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 <cmmarusich@gmail.com>
> 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 <cmmarusich@gmail.com>
> 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	other threads:[~2017-04-06  8:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27  4:54 bug#26271: 'guix system' does not support common build option '--root' Chris Marusich
2017-03-27  8:58 ` Ludovic Courtès
2017-03-27 14:12   ` Chris Marusich
2017-04-04  7:39     ` Chris Marusich
2017-04-04 21:34       ` Ludovic Courtès
2017-04-06  7:05         ` Chris Marusich
2017-04-06  8:23           ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vaqiymey.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=26271-done@debbugs.gnu.org \
    --cc=cmmarusich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).