[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51346] [PATCH v3 4/5] gnu: system: Filter out boot dependencies fro
From: |
Josselin Poiret |
Subject: |
[bug#51346] [PATCH v3 4/5] gnu: system: Filter out boot dependencies from swap-space. |
Date: |
Mon, 15 Nov 2021 20:26:30 +0000 |
* gnu/systems.scm (swap-services): Filter them.
---
gnu/system.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 76a904b681..03fb55db15 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -601,7 +601,25 @@ (define (%warn-swap-devices-change value location)
(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)
+ (if (swap-space? 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))))
+ 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, Ludovic Courtès, 2021/11/15
- [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags, Ludovic Courtès, 2021/11/15
- [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags, Ludovic Courtès, 2021/11/15
- [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags, Ludovic Courtès, 2021/11/15
- [bug#51346] [PATCH v3 0/5] Rework swap device to add dependencies and flags, Josselin Poiret, 2021/11/15
- [bug#51346] [PATCH v3 1/5] gnu: system: Rework swap space support, add dependencies., Josselin Poiret, 2021/11/15
- [bug#51346] [PATCH v3 2/5] gnu: system: Warn about swap-devices format change, Josselin Poiret, 2021/11/15
- [bug#51346] [PATCH v3 3/5] gnu: system: Add swap flags., Josselin Poiret, 2021/11/15
- [bug#51346] [PATCH v3 4/5] gnu: system: Filter out boot dependencies from swap-space.,
Josselin Poiret <=
- [bug#51346] [PATCH v3 5/5] doc: Add new Swap Space section., Josselin Poiret, 2021/11/15
- bug#51346: [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags, Ludovic Courtès, 2021/11/23