[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51346] [PATCH v2 3/4] gnu: system: Filter out boot dependencies fro
From: |
Josselin Poiret |
Subject: |
[bug#51346] [PATCH v2 3/4] gnu: system: Filter out boot dependencies from swap-space. |
Date: |
Wed, 27 Oct 2021 15:09:12 +0000 |
* gnu/systems.scm (swap-services): Filter them.
---
gnu/system.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 2797c07e36..e3accb3c1e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -586,7 +586,23 @@ (define (device-mapping-services os)
(define (swap-services os)
"Return the list of swap services for OS."
- (map swap-service (operating-system-swap-devices os)))
+ (define early-userspace-file-systems
+ (filter file-system-needed-for-boot?
+ (operating-system-file-systems os)))
+
+ (define early-userspace-mapped-devices
+ (operating-system-boot-mapped-devices os))
+
+ (define (filter-deps swap)
+ (swap-space
+ (inherit swap)
+ (dependencies (remove (lambda (dep)
+ (or (member dep early-userspace-mapped-devices)
+ (member dep early-userspace-file-systems)))
+ (swap-space-dependencies swap)))))
+
+ (map (compose swap-service filter-deps)
+ (operating-system-swap-devices os)))
(define* (system-linux-image-file-name #:optional
(target (or (%current-target-system)
--
2.33.1
- [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags, Josselin Poiret, 2021/10/23
- [bug#51346] [PATCH 1/1] gnu: system: Add support for swap dependencies and flags, Josselin Poiret, 2021/10/23
- [bug#51346] [PATCH 1/1] gnu: system: Add support for swap dependencies and flags, Tobias Geerinckx-Rice, 2021/10/24
- [bug#51346] [PATCH v2 0/4] Rework swap, add flags and dependencies., Josselin Poiret, 2021/10/27
- [bug#51346] [PATCH v2 1/4] gnu: system: Rework swap space support, add dependencies., Josselin Poiret, 2021/10/27
- [bug#51346] [PATCH v2 2/4] gnu: system: Add swap flags., Josselin Poiret, 2021/10/27
- [bug#51346] [PATCH v2 3/4] gnu: system: Filter out boot dependencies from swap-space.,
Josselin Poiret <=
- [bug#51346] [PATCH v2 4/4] doc: Add new Swap Space section., Josselin Poiret, 2021/10/27
- [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags, Tobias Geerinckx-Rice, 2021/10/23