aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-30 17:50:07 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-30 18:54:07 +0100
commit9cb426b8bf91830c2df76f9285ed98f45265ecc4 (patch)
tree4eabf81a559618340828c3842ff6c3670a66d7f9 /gnu
parent1c65314c60405333dde009d8c8d2e37a0a465b6f (diff)
downloadguix-9cb426b8bf91830c2df76f9285ed98f45265ecc4.tar
guix-9cb426b8bf91830c2df76f9285ed98f45265ecc4.tar.gz
Revert "system: Add a 'needed-for-boot?' field to 'mapped-device'."
This reverts commit 3b09332adf7ce8e976a4d117a62c586a53af04aa, which turned out to be a bad idea because we need to have dependency information between the device-mapping service and the file-system service that uses it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system.scm17
-rw-r--r--gnu/system/file-systems.scm5
2 files changed, 14 insertions, 8 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 731f9de55f..e1ed1a2f19 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -250,14 +250,23 @@ as 'needed-for-boot'."
(define (operating-system-user-mapped-devices os)
"Return the subset of mapped devices that can be installed in
user-land--i.e., those not needed during boot."
- (remove mapped-device-needed-for-boot?
- (operating-system-mapped-devices os)))
+ (let ((devices (operating-system-mapped-devices os))
+ (file-systems (operating-system-file-systems os)))
+ (filter (lambda (md)
+ (let ((user (mapped-device-user md file-systems)))
+ (or (not user)
+ (not (file-system-needed-for-boot? user)))))
+ devices)))
(define (operating-system-boot-mapped-devices os)
"Return the subset of mapped devices that must be installed during boot,
from the initrd."
- (filter mapped-device-needed-for-boot?
- (operating-system-mapped-devices os)))
+ (let ((devices (operating-system-mapped-devices os))
+ (file-systems (operating-system-file-systems os)))
+ (filter (lambda (md)
+ (let ((user (mapped-device-user md file-systems)))
+ (and user (file-system-needed-for-boot? user))))
+ devices)))
(define (device-mapping-services os)
"Return the list of device-mapping services for OS as a monadic list."
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 356b4826b4..4760821840 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -45,7 +45,6 @@
mapped-device-source
mapped-device-target
mapped-device-type
- mapped-device-needed-for-boot?
mapped-device-kind
mapped-device-kind?
@@ -158,9 +157,7 @@ file system."
mapped-device?
(source mapped-device-source) ;string
(target mapped-device-target) ;string
- (type mapped-device-type) ;<mapped-device-kind>
- (needed-for-boot? mapped-device-needed-for-boot? ;Boolean
- (default #f)))
+ (type mapped-device-type)) ;<mapped-device-kind>
(define-record-type* <mapped-device-type> mapped-device-kind
make-mapped-device-kind