Commit e3432d06 authored by segfault's avatar segfault
Browse files

Add workaround for udisks' create_partition not setting type (refs: #16168)

parent 8bc981a9
......@@ -101,6 +101,10 @@ class ImageCreator(object):
with self.setup_loop_device():
self.create_gpt()
self.create_partition()
# udisks' create_partition function seems to ignore arg_type
# in Stretch, so we set it via sgdisk.
# XXX:Buster: Remove set_partition_type
self.set_partition_type()
self.set_partition_flags()
# XXX: Rescan?
self.format_partition()
......@@ -189,6 +193,9 @@ class ImageCreator(object):
# (https://github.com/storaged-project/udisks/issues/418)
execute(["/sbin/sgdisk", "--attributes=1:=:%x" % SYSTEM_PARTITION_FLAGS, self.image])
def set_partition_type(self):
execute(["/sbin/sgdisk", "--typecode=1:%s" % ESP_GUID, self.image])
def format_partition(self):
logger.info("Formatting partition")
options = GLib.Variant('a{sv}', {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment