]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Use repart's new --architecture option
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 30 May 2023 11:40:21 +0000 (13:40 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 31 May 2023 21:02:13 +0000 (23:02 +0200)
This makes sure that --architecture works with user specified repart
configs as well instead of just the ones that we generate ourselves.

mkosi/__init__.py

index 17b3f38e2cbb6bd5c2d8ba7e619dbcf87d6f3480..4f1300a1b2296fe8516646a74748eb16c1a95464 100644 (file)
@@ -1595,6 +1595,8 @@ def invoke_repart(state: MkosiState, skip: Sequence[str] = [], split: bool = Fal
         state.staging / state.config.output_with_format,
     ]
 
+    if not state.config.architecture.is_native():
+        cmdline += ["--architecture", str(state.config.architecture)]
     if not state.staging.joinpath(state.config.output_with_format).exists():
         cmdline += ["--empty=create"]
     if state.config.passphrase:
@@ -1642,7 +1644,7 @@ def invoke_repart(state: MkosiState, skip: Sequence[str] = [], split: bool = Fal
                 dedent(
                     f"""\
                     [Partition]
-                    Type=root-{state.config.architecture}
+                    Type=root
                     Format={state.installer.filesystem()}
                     CopyFiles=/
                     Minimize=guess