]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: do not use PARTLABEL for msdos partition tables
authorHenning Schild <henning.schild@siemens.com>
Fri, 22 Apr 2022 09:44:48 +0000 (11:44 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Apr 2022 22:40:16 +0000 (23:40 +0100)
When using "msdos" partition tables and "--label" but not "--use-uuid"
one can generate images which will not find their root, because
PARTLABEL does not work for "msdos".

Fix that by simply not going the PARTLABEL path in case of "msdos".

Fixes: 2fb247c5ecf0 ("wic: support rootdev identified by partition label")
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/imager/direct.py

index 35fff7c10242b1d09edd520cae83b4bc8c2e2d76..4d0b836ef6036e522baab879952b024422abe20c 100644 (file)
@@ -259,7 +259,7 @@ class DirectPlugin(ImagerPlugin):
             if part.mountpoint == "/":
                 if part.uuid:
                     return "PARTUUID=%s" % part.uuid
-                elif part.label:
+                elif part.label and self.ptable_format != 'msdos':
                     return "PARTLABEL=%s" % part.label
                 else:
                     suffix = 'p' if part.disk.startswith('mmcblk') else ''