[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/19: system: Filter out boot dependencies from swap-space.
From: |
guix-commits |
Subject: |
16/19: system: Filter out boot dependencies from swap-space. |
Date: |
Tue, 23 Nov 2021 04:26:36 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 4af3262d9857405aff0a4a855403247f0f485e15
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Mon Nov 15 20:26:30 2021 +0000
system: Filter out boot dependencies from swap-space.
* gnu/systems.scm (swap-services): Filter them.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/system.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 2e5a5ff..9de0f79 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -601,7 +601,25 @@ See \"(guix) operating-system Reference\" for more
details.~%")))
(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)
- 05/19: gnu: Add python-dbus-next., (continued)
- 05/19: gnu: Add python-dbus-next., guix-commits, 2021/11/23
- 01/19: maint: "make dist" builds tarballs in 'ustar' format., guix-commits, 2021/11/23
- 02/19: gnu: Add python-tinydb., guix-commits, 2021/11/23
- 04/19: gnu: python-xcffib: Upgrade to 0.11.1., guix-commits, 2021/11/23
- 14/19: system: Warn about swap-devices format change, guix-commits, 2021/11/23
- 18/19: guix graph: Show '-M' in '--help' output., guix-commits, 2021/11/23
- 09/19: gnu: piper: Update to 0.6., guix-commits, 2021/11/23
- 15/19: system: Add swap flags., guix-commits, 2021/11/23
- 12/19: doc: Fix the example of "Using virt-viewer with Spice"., guix-commits, 2021/11/23
- 11/19: docker: Enable arm64 docker image building for 'guix pack'., guix-commits, 2021/11/23
- 16/19: system: Filter out boot dependencies from swap-space.,
guix-commits <=
- 13/19: system: Rework swap space support, add dependencies., guix-commits, 2021/11/23
- 19/19: Update NEWS., guix-commits, 2021/11/23
- 06/19: gnu: Add python-iwlib., guix-commits, 2021/11/23
- 07/19: gnu: Add qtile., guix-commits, 2021/11/23
- 10/19: gnu: pipe-viewer: Update to 0.1.7., guix-commits, 2021/11/23
- 08/19: gnu: libratbag: Update to 0.16., guix-commits, 2021/11/23
- 17/19: doc: Add new Swap Space section., guix-commits, 2021/11/23