]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Move copy_nspawn_settings
authorMichael Ferrari <nekkodroid404@gmail.com>
Fri, 18 Oct 2024 09:08:04 +0000 (11:08 +0200)
committerMichael Ferrari <nekkodroid404@gmail.com>
Fri, 18 Oct 2024 09:10:13 +0000 (11:10 +0200)
mkosi/__init__.py

index 2210b3918a35bf70d8ce57ee91ec42ba14a64bf8..a3f6531820c67f6db05c11d2d5cd8123164f7b65 100644 (file)
@@ -2144,6 +2144,14 @@ def maybe_compress(
                 run(cmd, stdin=i, stdout=o, sandbox=context.sandbox(binary=cmd[0]))
 
 
+def copy_nspawn_settings(context: Context) -> None:
+    if context.config.nspawn_settings is None:
+        return None
+
+    with complete_step("Copying nspawn settings file…"):
+        shutil.copy2(context.config.nspawn_settings, context.staging / context.config.output_nspawn_settings)
+
+
 def copy_uki(context: Context) -> None:
     if (context.staging / context.config.output_split_uki).exists():
         return
@@ -2189,14 +2197,6 @@ def copy_vmlinuz(context: Context) -> None:
         break
 
 
-def copy_nspawn_settings(context: Context) -> None:
-    if context.config.nspawn_settings is None:
-        return None
-
-    with complete_step("Copying nspawn settings file…"):
-        shutil.copy2(context.config.nspawn_settings, context.staging / context.config.output_nspawn_settings)
-
-
 def copy_initrd(context: Context) -> None:
     if not want_initrd(context):
         return