linux-container: Adjust to 'modify-services' semantic change.
This is a followup to dbbc7e9461
:
'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'.
This commit is contained in:
parent
74443c30f3
commit
44bbfc24e4
1 changed files with 12 additions and 9 deletions
|
@ -150,15 +150,18 @@ (define services-to-add
|
|||
(essential-services (container-essential-services
|
||||
this-operating-system
|
||||
#:shared-network? shared-network?))
|
||||
(services (append (remove (lambda (service)
|
||||
(memq (service-kind service)
|
||||
services-to-drop))
|
||||
(modify-services (operating-system-user-services os)
|
||||
(nscd-service-type
|
||||
config => (nscd-configuration
|
||||
(inherit config)
|
||||
(caches %nscd-container-caches)))))
|
||||
services-to-add))
|
||||
(services
|
||||
(append services-to-add
|
||||
(filter-map (lambda (s)
|
||||
(cond ((memq (service-kind s) services-to-drop)
|
||||
#f)
|
||||
((eq? nscd-service-type (service-kind s))
|
||||
(service nscd-service-type
|
||||
(nscd-configuration
|
||||
(inherit (service-value s))
|
||||
(caches %nscd-container-caches))))
|
||||
(else s)))
|
||||
(operating-system-user-services os))))
|
||||
(file-systems (append (map mapping->fs
|
||||
(if shared-network?
|
||||
(append %network-file-mappings mappings)
|
||||
|
|
Loading…
Reference in a new issue