From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:53176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hPlso-00071d-MX for guix-patches@gnu.org; Sun, 12 May 2019 06:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hPlsn-0007XC-Ka for guix-patches@gnu.org; Sun, 12 May 2019 06:39:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56638) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hPlsm-0007WP-JP for guix-patches@gnu.org; Sun, 12 May 2019 06:39:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hPlsm-0002tl-FN for guix-patches@gnu.org; Sun, 12 May 2019 06:39:04 -0400 Subject: [bug#35697] [PATCH 6/8] system: Add 'operating-system-with-gc-roots'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 12 May 2019 12:38:00 +0200 Message-Id: <20190512103802.17032-6-ludo@gnu.org> In-Reply-To: <20190512103802.17032-1-ludo@gnu.org> References: <20190512103802.17032-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35697@debbugs.gnu.org Cc: Chris Marusich * gnu/tests/install.scm (operating-system-with-gc-roots): Move to... * gnu/system.scm (operating-system-with-gc-roots): ... here. New procedure. --- gnu/system.scm | 12 ++++++++++++ gnu/tests/install.scm | 11 ----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 2c4ca55ffc..01be1243fe 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -109,6 +109,7 @@ operating-system-boot-script system-linux-image-file-name + operating-system-with-gc-roots boot-parameters boot-parameters? @@ -519,6 +520,17 @@ bookkeeping." (append (operating-system-user-services os) (operating-system-essential-services os)))) +(define (operating-system-with-gc-roots os roots) + "Return a variant of OS where ROOTS are registered as GC roots." + (operating-system + (inherit os) + + ;; We use this procedure for the installation OS, which already defines GC + ;; roots. Add ROOTS to those. + (services (cons (simple-service 'extra-root + gc-root-service-type roots) + (operating-system-user-services os))))) + ;;; ;;; /etc. diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 430a102378..7b5ee18505 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -123,17 +123,6 @@ (inherit config) (guix (current-guix)))))))) -(define (operating-system-with-gc-roots os roots) - "Return a variant of OS where ROOTS are registered as GC roots." - (operating-system - (inherit os) - - ;; We use this procedure for the installation OS, which already defines GC - ;; roots. Add ROOTS to those. - (services (cons (simple-service 'extra-root - gc-root-service-type roots) - (operating-system-user-services os))))) - (define MiB (expt 2 20)) -- 2.21.0