Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-12-07 15:29:34 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-12-07 15:29:34 +0100
commitde4471ca68fdf57cb5c6549c09687d44baed3fea (patch)
tree5eb752c829a4256d2abec51943407776e7a8056b /archinstall
parent17883fcb9f42f0ac6df21bb1d16fcecca3efa131 (diff)
Adding some debugging for #67
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index c4517e27..a0ba3742 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -77,6 +77,7 @@ class BlockDevice():
#o = b''.join(sys_command('/usr/bin/lsblk -o name -J -b {dev}'.format(dev=dev)))
o = b''.join(sys_command(f'/usr/bin/lsblk -J {self.path}'))
+ print(self, 'paritions:', o)
if b'not a block device' in o:
raise DiskError(f'Can not read partitions off something that isn\'t a block device: {self.path}')
@@ -221,9 +222,13 @@ class Filesystem():
def add_partition(self, type, start, end, format=None):
log(f'Adding partition to {self.blockdevice}', level=LOG_LEVELS.Info, file=storage.get('logfile', None))
if format:
- return self.parted(f'{self.blockdevice.device} mkpart {type} {format} {start} {end}') == 0
+ paritioning = self.parted(f'{self.blockdevice.device} mkpart {type} {format} {start} {end}') == 0:
else:
- return self.parted(f'{self.blockdevice.device} mkpart {type} {start} {end}') == 0
+ paritioning = self.parted(f'{self.blockdevice.device} mkpart {type} {start} {end}') == 0
+
+ if paritioning:
+ print(b''.join(sys_command(f'/usr/bin/ {string}')))
+ return True
def set_name(self, partition:int, name:str):
return self.parted(f'{self.blockdevice.device} name {partition+1} "{name}"') == 0