Message ID | 20221214015303.18991-1-maxim.cournoyer@gmail.com |
---|---|
State | New |
Headers | show |
Series | [bug#60055] scripts: system: Skip initrd modules check when using --target. | expand |
Hi, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > * guix/scripts/system.scm (perform-action): Do not call CHECK-INITRD-MODULES > when the %current-target-system parameter is set. [...] > + (unless (%current-target-system) > + ;; Skip the check if the user is making use of --target, as it doesn't > + ;; make sense in this context. > + (check-initrd-modules os)))) s/doesn’t make sense.*/cannot be checked against the running kernel./ Otherwise LGTM, thanks! Ludo’.
Hello, Ludovic Courtès <ludo@gnu.org> writes: > Hi, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > >> * guix/scripts/system.scm (perform-action): Do not call CHECK-INITRD-MODULES >> when the %current-target-system parameter is set. > > [...] > >> + (unless (%current-target-system) >> + ;; Skip the check if the user is making use of --target, as it doesn't >> + ;; make sense in this context. >> + (check-initrd-modules os)))) > > s/doesn’t make sense.*/cannot be checked against the running kernel./ > > Otherwise LGTM, thanks! Thanks for precising the comment. Applied with the suggestion!
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 6482318168..54a79501ec 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -842,7 +842,10 @@ (define bootcfg (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 doesn't + ;; make sense in this context. + (check-initrd-modules os)))) (mlet* %store-monad ((sys (system-derivation-for-action image action