[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#35697] [PATCH 6/8] system: Add 'operating-system-with-gc-roots'.
From: |
Ludovic Courtès |
Subject: |
[bug#35697] [PATCH 6/8] system: Add 'operating-system-with-gc-roots'. |
Date: |
Sun, 12 May 2019 12:38:00 +0200 |
* 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
- [bug#35697] [PATCH 0/8] Make 'guix system docker-image' readily usable, Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 1/8] system: Export 'operating-system-default-essential-services'., Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 2/8] linux-container: Improve filtering of unnecessary file systems., Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 4/8] linux-container: Do not add %CONTAINER-FILE-SYSTEMS to Docker image OSes., Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 3/8] services: 'gc-root-service-type' now has a default value., Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 6/8] system: Add 'operating-system-with-gc-roots'.,
Ludovic Courtès <=
- [bug#35697] [PATCH 5/8] linux-container: Compute essential services for THIS-OPERATING-SYSTEM., Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 7/8] docker: 'build-docker-image' accepts an optional #:entry-point., Ludovic Courtès, 2019/05/12
- [bug#35697] [PATCH 8/8] vm: 'system-docker-image' provides an entry point., Ludovic Courtès, 2019/05/12
- bug#35697: [PATCH 0/8] Make 'guix system docker-image' readily usable, Ludovic Courtès, 2019/05/15