index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/disk.py | 8 |
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index 0a182eb0..b66aa162 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -129,6 +129,9 @@ class BlockDevice(): return True return False + def flush_cache(self): + self.part_cache = OrderedDict() + class Partition(): def __init__(self, path, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True): if not part_id: @@ -365,7 +368,8 @@ class Filesystem(): if self.blockdevice.keep_partitions is False: log(f'Wiping {self.blockdevice} by using partition format {self.mode}', level=LOG_LEVELS.Debug) if self.mode == GPT: - if sys_command(f'/usr/bin/parted -s {self.blockdevice.device} mklabel gpt',).exit_code == 0: + if self.raw_parted(f'{self.blockdevice.device} mklabel gpt').exit_code == 0: + self.blockdevice.flush_cache() return self else: raise DiskError(f'Problem setting the partition format to GPT:', f'/usr/bin/parted -s {self.blockdevice.device} mklabel gpt') @@ -397,7 +401,7 @@ class Filesystem(): def raw_parted(self, string:str): x = sys_command(f'/usr/bin/parted -s {string}') - o = b''.join(x) + log(f"'parted -s {string}' returned: {b''.join(x)}", level=LOG_LEVELS.Debug) return x def parted(self, string:str): |