From cebf67086f6818ec1b20452f324f8c9da08ada43 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Thu, 26 Jan 2017 17:43:33 +0200 Subject: [PATCH] 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/wic/utils/partitionedfs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 721d514326..ed67b9ace7 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py @@ -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'" % \