summaryrefslogtreecommitdiff
path: root/gnu/system/linux-container.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-06-09 18:12:42 +0200
committerLudovic Courtès <ludo@gnu.org>2023-06-09 18:15:07 +0200
commit44bbfc24e4bcc48d0e3343cd3d83452721af8c36 (patch)
tree29cbadf06ead137e58bbf193e953dd6e82013da3 /gnu/system/linux-container.scm
parent74443c30f3e20655a046c0d3ea236822ef130968 (diff)
linux-container: Adjust to 'modify-services' semantic change.
This is a followup to dbbc7e946131ba257728f1d05b96c4339b7ee88b: 'nscd-service-type' isn't necessarily present in OS, so we cannot use the 'modify-services' as it would now error out. This was happening with the "guix system docker-image" test in 'tests/guix-system.sh'. * gnu/system/linux-container.scm (containerized-operating-system): Use 'filter-map' instead of 'remove' + 'modify-services'.
Diffstat (limited to 'gnu/system/linux-container.scm')
-rw-r--r--gnu/system/linux-container.scm21
1 files changed, 12 insertions, 9 deletions
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 409386a84fd..7c45dbccafb 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -150,15 +150,18 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS."
150 (essential-services (container-essential-services 150 (essential-services (container-essential-services
151 this-operating-system 151 this-operating-system
152 #:shared-network? shared-network?)) 152 #:shared-network? shared-network?))
153 (services (append (remove (lambda (service) 153 (services
154 (memq (service-kind service) 154 (append services-to-add
155 services-to-drop)) 155 (filter-map (lambda (s)
156 (modify-services (operating-system-user-services os) 156 (cond ((memq (service-kind s) services-to-drop)
157 (nscd-service-type 157 #f)
158 config => (nscd-configuration 158 ((eq? nscd-service-type (service-kind s))
159 (inherit config) 159 (service nscd-service-type
160 (caches %nscd-container-caches))))) 160 (nscd-configuration
161 services-to-add)) 161 (inherit (service-value s))
162 (caches %nscd-container-caches))))
163 (else s)))
164 (operating-system-user-services os))))
162 (file-systems (append (map mapping->fs 165 (file-systems (append (map mapping->fs
163 (if shared-network? 166 (if shared-network?
164 (append %network-file-mappings mappings) 167 (append %network-file-mappings mappings)