wic: partitionedfs: set partition name for gpt partitions

Set proper gpt partition name for the partitions in case given
in the configuration

(From OE-Core rev: bc6e6a34f35bd081d828160bab8ee12e770c7e1e)

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jukka Laitinen 2017-01-26 17:43:33 +02:00 committed by Richard Purdie
parent c01cc6ff24
commit cebf67086f
1 changed files with 7 additions and 0 deletions

View 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'" % \