]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
repart: Support mkfs options from configured environment
authorMichael A Cassaniti <michael@cassaniti.id.au>
Mon, 1 May 2023 00:16:04 +0000 (10:16 +1000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 1 May 2023 07:35:46 +0000 (09:35 +0200)
mkosi/__init__.py

index e8322779cf8f338cf4b1a1ca31c86e2ff8e1f5c5..fdd53d6282cd7ac66ab5397a3492d944d2c740f8 100644 (file)
@@ -1488,6 +1488,10 @@ def invoke_repart(state: MkosiState, skip: Sequence[str] = [], split: bool = Fal
     for fs, options in state.installer.filesystem_options(state).items():
         env[f"SYSTEMD_REPART_MKFS_OPTIONS_{fs.upper()}"] = " ".join(options)
 
+    for option, value in state.environment.items():
+        if option.startswith("SYSTEMD_REPART_MKFS_OPTIONS_"):
+            env[option] = value
+
     with complete_step("Generating disk image"):
         output = json.loads(run(cmdline, stdout=subprocess.PIPE, env=env).stdout)