diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index dfaa901567..7315d8f073 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
| @@ -571,11 +571,12 @@ class PartitionedImage(): | |||
| 571 | self._create_partition(self.path, part.type, | 571 | self._create_partition(self.path, part.type, |
| 572 | parted_fs_type, part.start, part.size_sec) | 572 | parted_fs_type, part.start, part.size_sec) |
| 573 | 573 | ||
| 574 | if part.part_name: | 574 | if self.ptable_format == "gpt" and (part.part_name or part.label): |
| 575 | partition_label = part.part_name if part.part_name else part.label | ||
| 575 | logger.debug("partition %d: set name to %s", | 576 | logger.debug("partition %d: set name to %s", |
| 576 | part.num, part.part_name) | 577 | part.num, partition_label) |
| 577 | exec_native_cmd("sgdisk --change-name=%d:%s %s" % \ | 578 | exec_native_cmd("sgdisk --change-name=%d:%s %s" % \ |
| 578 | (part.num, part.part_name, | 579 | (part.num, partition_label, |
| 579 | self.path), self.native_sysroot) | 580 | self.path), self.native_sysroot) |
| 580 | 581 | ||
| 581 | if part.part_type: | 582 | if part.part_type: |
| @@ -592,13 +593,6 @@ class PartitionedImage(): | |||
| 592 | (part.num, part.uuid, self.path), | 593 | (part.num, part.uuid, self.path), |
| 593 | self.native_sysroot) | 594 | self.native_sysroot) |
| 594 | 595 | ||
| 595 | if part.label and self.ptable_format == "gpt": | ||
| 596 | logger.debug("partition %d: set name to %s", | ||
| 597 | part.num, part.label) | ||
| 598 | exec_native_cmd("parted -s %s name %d %s" % \ | ||
| 599 | (self.path, part.num, part.label), | ||
| 600 | self.native_sysroot) | ||
| 601 | |||
| 602 | if part.active: | 596 | if part.active: |
| 603 | flag_name = "legacy_boot" if self.ptable_format == 'gpt' else "boot" | 597 | flag_name = "legacy_boot" if self.ptable_format == 'gpt' else "boot" |
| 604 | logger.debug("Set '%s' flag for partition '%s' on disk '%s'", | 598 | logger.debug("Set '%s' flag for partition '%s' on disk '%s'", |
