Call prepare() externally to the sysa and sysc classes

This keeps the prepartion and bootstrap initiation logic in the same
place for each bootstrap mode, and allows each mode to specify its
own requirements and expectations from the different bootstrap steps.
This commit is contained in:
Dor Askayo 2022-05-23 14:18:52 +03:00
parent a7c7ddf977
commit 6d357226a9
3 changed files with 20 additions and 8 deletions

View file

@ -20,7 +20,7 @@ class SysC(SysGeneral):
dev_name = None
# pylint: disable=too-many-instance-attributes
def __init__(self, arch, preserve_tmp, tmpdir, chroot):
def __init__(self, arch, preserve_tmp, tmpdir):
self.git_dir = os.path.dirname(os.path.join(__file__))
self.arch = arch
self.preserve_tmp = preserve_tmp
@ -33,8 +33,6 @@ class SysC(SysGeneral):
self.tmp_dir = os.path.join(tmpdir, 'sysc')
os.mkdir(self.tmp_dir)
self.prepare(not chroot)
def __del__(self):
if not self.preserve_tmp:
if self.dev_name is not None: