mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-12 06:15:29 +01:00
Variety of improvements
- Rename sources to distfiles for clarity. - Per sys(a/c) distfiles to reduce rootfs.py processing and reduce RAM usage in sysa. - Canonicalise early kaem mes/tcc files to kaem script conventions. - Cleanup unused setup in python.
This commit is contained in:
parent
acf713595c
commit
f1600467a7
48 changed files with 130 additions and 138 deletions
20
sysb.py
20
sysb.py
|
|
@ -2,36 +2,20 @@
|
|||
"""System B"""
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
||||
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
||||
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib.utils import copytree
|
||||
from lib.sysgeneral import SysGeneral
|
||||
|
||||
class SysB(SysGeneral):
|
||||
"""
|
||||
Class responsible for preparing sources for System B.
|
||||
"""
|
||||
def __init__(self, arch, preserve_tmp, tmpdir, chroot):
|
||||
def __init__(self, arch, preserve_tmp, chroot):
|
||||
self.git_dir = os.path.dirname(os.path.join(__file__))
|
||||
self.arch = arch
|
||||
self.preserve_tmp = preserve_tmp
|
||||
self.chroot = chroot
|
||||
|
||||
self.sys_dir = os.path.join(self.git_dir, 'sysb')
|
||||
if tmpdir is None:
|
||||
self.tmp_dir = os.path.join(self.sys_dir, 'tmp')
|
||||
else:
|
||||
self.tmp_dir = os.path.join(tmpdir, 'sysb')
|
||||
os.mkdir(self.tmp_dir)
|
||||
|
||||
self.prepare()
|
||||
|
||||
def prepare(self):
|
||||
"""
|
||||
Prepare directory structure for System B.
|
||||
"""
|
||||
self.mount_tmpfs()
|
||||
copytree(self.sys_dir, self.tmp_dir, ignore=shutil.ignore_patterns("tmp"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue