Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/blockdevice.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2022-10-12 14:17:14 +0200
committerGitHub <noreply@github.com>2022-10-12 14:17:14 +0200
commiteec45643e950a5b982e1478ef57497491ec37f73 (patch)
tree9be7abbe48a2a466203f7063bf4754a1dc57618f /archinstall/lib/disk/blockdevice.py
parent5c8eb7144d9583a8a117a4e892b1e78be1324a28 (diff)
Updating Partition() information after mount and unmount. (#1508)
* Updating Partition() information after mount and unmount. * Cleaned up raw_parted() to gracefully output relevant partition error information. * Adding timestmap to cmd_history.txt as it's impossible to debug properly otherwise * Adding more verbose debugging information * Reinstating the lsblk retry code for PARTUUID and UUID on Partition()'s information * Added error handling for JSON parsing
Diffstat (limited to 'archinstall/lib/disk/blockdevice.py')
-rw-r--r--archinstall/lib/disk/blockdevice.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/archinstall/lib/disk/blockdevice.py b/archinstall/lib/disk/blockdevice.py
index 736bacbc..cd0e14a6 100644
--- a/archinstall/lib/disk/blockdevice.py
+++ b/archinstall/lib/disk/blockdevice.py
@@ -274,12 +274,16 @@ class BlockDevice:
if not uuid and not partuuid:
raise ValueError(f"BlockDevice.get_partition() requires either a UUID or a PARTUUID for lookups.")
+ log(f"Retrieving partition PARTUUID={partuuid} or UUID={uuid}", level=logging.INFO, fg="teal")
+
for count in range(storage.get('DISK_RETRY_ATTEMPTS', 5)):
for partition_index, partition in self.partitions.items():
try:
if uuid and partition.uuid and partition.uuid.lower() == uuid.lower():
+ log(f"Matched UUID={uuid} against {partition.uuid}", level=logging.INFO, fg="teal")
return partition
elif partuuid and partition.part_uuid and partition.part_uuid.lower() == partuuid.lower():
+ log(f"Matched PARTUUID={partuuid} against {partition.part_uuid}", level=logging.INFO, fg="teal")
return partition
except DiskError as error:
# Most likely a blockdevice that doesn't support or use UUID's