mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-11 05:45:23 +01:00
Move chroot transition script inside bootstrap.
This commit is contained in:
parent
35a7df58b7
commit
c6c8a1eb7f
5 changed files with 21 additions and 28 deletions
12
sysa.py
12
sysa.py
|
|
@ -17,7 +17,7 @@ class SysA(SysGeneral):
|
|||
Class responsible for preparing sources for System A.
|
||||
"""
|
||||
# pylint: disable=too-many-instance-attributes,too-many-arguments
|
||||
def __init__(self, arch, preserve_tmp, tmpdir, chroot, sysb_tmp):
|
||||
def __init__(self, arch, preserve_tmp, tmpdir, chroot, sysb_tmp, sysc_tmp):
|
||||
self.git_dir = os.path.dirname(os.path.join(__file__))
|
||||
self.arch = arch
|
||||
self.preserve_tmp = preserve_tmp
|
||||
|
|
@ -31,6 +31,8 @@ class SysA(SysGeneral):
|
|||
self.after_dir = os.path.join(self.tmp_dir, 'after')
|
||||
self.base_dir = self.after_dir
|
||||
self.sysb_tmp = sysb_tmp
|
||||
self.sysc_tmp = sysc_tmp
|
||||
self.chroot = chroot
|
||||
|
||||
self.prepare()
|
||||
|
||||
|
|
@ -52,11 +54,19 @@ class SysA(SysGeneral):
|
|||
# sysb must be added to sysa as it is another initramfs stage
|
||||
self.sysb()
|
||||
|
||||
if self.chroot:
|
||||
self.sysc()
|
||||
|
||||
def sysb(self):
|
||||
"""Copy in sysb files for sysb."""
|
||||
shutil.copytree(self.sysb_tmp, os.path.join(self.tmp_dir, 'sysb'),
|
||||
shutil.ignore_patterns('tmp'))
|
||||
|
||||
def sysc(self):
|
||||
"""Copy in sysc files for sysc."""
|
||||
shutil.copytree(self.sysc_tmp, os.path.join(self.tmp_dir, 'sysc'),
|
||||
shutil.ignore_patterns('tmp'))
|
||||
|
||||
def stage0_posix(self):
|
||||
"""Copy in all of the stage0-posix"""
|
||||
stage0_posix_base_dir = os.path.join(self.sys_dir, 'stage0-posix', 'src')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue