[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: linux-container: Adjust to 'modify-services' sema
From: |
guix-commits |
Subject: |
branch master updated: linux-container: Adjust to 'modify-services' semantic change. |
Date: |
Fri, 09 Jun 2023 12:16:06 -0400 |
This is an automated email from the git hooks/post-receive script.
civodul pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 44bbfc24e4 linux-container: Adjust to 'modify-services' semantic
change.
44bbfc24e4 is described below
commit 44bbfc24e4bcc48d0e3343cd3d83452721af8c36
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 9 18:12:42 2023 +0200
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'.
---
gnu/system/linux-container.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index 409386a84f..7c45dbccaf 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."
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: linux-container: Adjust to 'modify-services' semantic change.,
guix-commits <=