mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 13:36:58 +02:00
disk_util: ensure partitions are layed out on disk in order
So far the default iteration order of python dicts has mostly matched the order that we want the partitions on disk but this is not always the case. I caught the BIOS-BOOT partition being ordered on disk after the USR-A partition. Nothing bad came of this but consistancy is good.
This commit is contained in:
parent
edae8bb5e0
commit
2f081e91c8
@ -127,7 +127,7 @@ def LoadPartitionConfig(options):
|
||||
for base_key, base_value in base_part.iteritems():
|
||||
part.setdefault(base_key, base_value)
|
||||
|
||||
for part_num, part in layout.iteritems():
|
||||
for part_num, part in sorted(layout.iteritems(), key=lambda t: int(t[0])):
|
||||
if part['type'] == 'blank':
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user