Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/disk/helpers.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-12-16 09:00:10 +0000
committerGitHub <noreply@github.com>2021-12-16 09:00:10 +0000
commit7a018415862677c165494decc5d8ad9e06c65fb7 (patch)
tree0d216ce16b2e02f5270560621185db6ea8afee0d /archinstall/lib/disk/helpers.py
parent3c2e71b4bbfa2168afb54eb70aeecce9064c8435 (diff)
Changed lsblk to blkid where possible (#802)
* Swapped lsblk for blkid * Added a hefty sleep on partprobe() And added a TODO for the future
Diffstat (limited to 'archinstall/lib/disk/helpers.py')
-rw-r--r--archinstall/lib/disk/helpers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/archinstall/lib/disk/helpers.py b/archinstall/lib/disk/helpers.py
index 9442f1b6..8e6a79e4 100644
--- a/archinstall/lib/disk/helpers.py
+++ b/archinstall/lib/disk/helpers.py
@@ -214,10 +214,14 @@ def find_partition_by_mountpoint(block_devices, relative_mountpoint :str):
def partprobe():
SysCommand(f'bash -c "partprobe"')
+ time.sleep(5)
def convert_device_to_uuid(path :str) -> str:
for i in range(storage['DISK_RETRY_ATTEMPTS']):
partprobe()
+
+ # TODO: Convert lsblk to blkid
+ # (lsblk supports BlockDev and Partition UUID grabbing, blkid requires you to pick PTUUID and PARTUUID)
output = json.loads(SysCommand(f"lsblk --json -o+UUID {path}").decode('UTF-8'))
for device in output['blockdevices']:
@@ -226,4 +230,4 @@ def convert_device_to_uuid(path :str) -> str:
time.sleep(storage['DISK_TIMEOUTS'])
- raise DiskError(f"Could not retrieve the UUID of {path} within a timely manner.") \ No newline at end of file
+ raise DiskError(f"Could not retrieve the UUID of {path} within a timely manner.")