From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#26271: 'guix system' does not support common build option '--root' Date: Thu, 06 Apr 2017 10:23:33 +0200 Message-ID: <87vaqiymey.fsf@gnu.org> References: <871stjfhfk.fsf@gmail.com> <87y3vrm6zi.fsf@gnu.org> <87inmu3j12.fsf@gmail.com> <87zifwaafz.fsf@garuda.i-did-not-set--mail-host-address--so-tickle-me> <87zifvn9g8.fsf@gnu.org> <87wpayf22a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cw2i8-0003Ps-8r for bug-guix@gnu.org; Thu, 06 Apr 2017 04:24:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cw2i2-0002Qn-I6 for bug-guix@gnu.org; Thu, 06 Apr 2017 04:24:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cw2i2-0002Qh-F7 for bug-guix@gnu.org; Thu, 06 Apr 2017 04:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cw2i2-0004NQ-A9 for bug-guix@gnu.org; Thu, 06 Apr 2017 04:24:02 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87wpayf22a.fsf@gmail.com> (Chris Marusich's message of "Thu, 06 Apr 2017 00:05:49 -0700") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Chris Marusich Cc: 26271-done@debbugs.gnu.org Hi, Chris Marusich 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 =E2=80=9CInvoking guix system=E2=80=9D becaus= e =E2=80=9CCommon Build Options=E2=80=9D doesn=E2=80=99t 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=E2=80=99d only once =E2=80=98gui= x system=E2=80=99 had completed. > From 8b768570b26d9a44ea140b0cd29383d32d37a0df Mon Sep 17 00:00:00 2001 > From: Chris Marusich > 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 > Date: Mon, 3 Apr 2017 23:49:22 -0700 > Subject: [PATCH 2/2] system: Support the --root option in 'guix system'. > > Fixes . > > * guix/scripts/system.scm (perform-action): Add #:gc-root parameter and h= onor > 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=3DFILE for 'vm', 'vm-image', 'disk-image', 'containe= r', > + 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=E2=80=99.