]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: partitionedfs: set partition name for gpt partitions
authorJukka Laitinen <jukka.laitinen@intel.com>
Thu, 26 Jan 2017 15:43:33 +0000 (17:43 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 Jan 2017 14:13:28 +0000 (14:13 +0000)
Set proper gpt partition name for the partitions in case given
in the configuration

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/utils/partitionedfs.py

index 721d51432605fe71c02c59a8d81c833cba1d445f..ed67b9ace73be083fb867a0432bdabf1b9b0b063 100644 (file)
@@ -316,6 +316,13 @@ class Image():
                                 (part['num'], part['uuid'], disk['disk'].device),
                                 self.native_sysroot)
 
+            if part['label'] and disk['ptable_format'] == "gpt":
+                msger.debug("partition %d: set name to %s" % \
+                            (part['num'], part['label']))
+                exec_native_cmd("parted -s %s name %d %s" % \
+                                (disk['disk'].device, part['num'], part['label']),
+                                self.native_sysroot)
+
             if part['boot']:
                 flag_name = "legacy_boot" if disk['ptable_format'] == 'gpt' else "boot"
                 msger.debug("Set '%s' flag for partition '%s' on disk '%s'" % \