From 30465558bd2ac1863013fd8382c0fc6b2233acc3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 8 Dec 2022 23:27:57 -0500 Subject: guix system: Skip initrd modules check when using --target. * guix/scripts/system.scm (perform-action): Do not call CHECK-INITRD-MODULES when the %current-target-system parameter is set. --- guix/scripts/system.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 6482318168..6fd915cb5e 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -842,7 +842,10 @@ static checks." (check-mapped-devices os) (when (zero? (getuid)) (check-file-system-availability (operating-system-file-systems os)) - (check-initrd-modules os))) + (unless (%current-target-system) + ;; Skip the check if the user is making use of --target, as it cannot + ;; be checked against the running kernel. + (check-initrd-modules os)))) (mlet* %store-monad ((sys (system-derivation-for-action image action -- cgit v1.2.3