]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix partition identification for mount.usr=PARTUUID
authorNick Labich <nick@labich.org>
Thu, 11 Jul 2024 07:08:25 +0000 (03:08 -0400)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 11 Jul 2024 07:54:40 +0000 (09:54 +0200)
mkosi/__init__.py

index 82a19f528cb3ccbedb082f8140c9fb7ff1c74980..4fe6c10470e82b04c7c4c749b61c3341a77ca14b 100644 (file)
@@ -2296,7 +2296,8 @@ def finalize_cmdline(context: Context, partitions: Sequence[Partition], roothash
 
     if not roothash:
         for name in ("root", "mount.usr"):
-            if not (root := next((p.uuid for p in partitions if p.type.startswith(name)), None)):
+            type_prefix = name.removeprefix("mount.")
+            if not (root := next((p.uuid for p in partitions if p.type.startswith(type_prefix)), None)):
                 continue
 
             cmdline = [f"{name}=PARTUUID={root}" if c == f"{name}=PARTUUID" else c for c in cmdline]