Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-03-09 10:38:04 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-03-09 10:38:04 +0100
commit16b0f4a4a48e6e0363db653a6ec1cedbb4741647 (patch)
tree494d816cc13c98fd0abcc7ceb17aee4ae99e63ba
parent7ee48156486101a43e90f834825dfeb0742247bd (diff)
Fixed an issue where Partition() instances got overwritten every time disk.partitions were called. Causing flags such as .encrypted to be dropped. This should make for a more stable experience when working with the partitions.
-rw-r--r--archinstall/lib/disk.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 3397d7cb..92982499 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -106,7 +106,8 @@ class BlockDevice():
part_id = part['name'][len(os.path.basename(self.path)):]
if part_id not in self.part_cache:
## TODO: Force over-write even if in cache?
- self.part_cache[part_id] = Partition(root_path + part_id, part_id=part_id, size=part['size'])
+ if part_id not in self.part_cache or self.part_cache[part_id].size != part['size']:
+ self.part_cache[part_id] = Partition(root_path + part_id, part_id=part_id, size=part['size'])
return {k: self.part_cache[k] for k in sorted(self.part_cache)}