mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-12 06:15:29 +01:00
Make Python bootstrap optional
Sets precedent for including additional language bootstraps.
This commit is contained in:
parent
749b2bfe37
commit
c9fa9a00f4
3 changed files with 29 additions and 12 deletions
10
rootfs.py
10
rootfs.py
|
|
@ -49,6 +49,8 @@ def create_configuration_file(args):
|
|||
config.write("DISK=sda1\n")
|
||||
config.write("KERNEL_BOOTSTRAP=False\n")
|
||||
config.write(f"BUILD_KERNELS={args.update_checksums or args.build_kernels}\n")
|
||||
for extra in args.extras.split(","):
|
||||
config.write(f"EXTRA_{extra.upper()}=True\n")
|
||||
config.write(f"CONFIGURATOR={args.configurator}\n")
|
||||
|
||||
# pylint: disable=too-many-statements,too-many-branches
|
||||
|
|
@ -101,6 +103,8 @@ def main():
|
|||
parser.add_argument("--internal-ci", help="INTERNAL for github CI")
|
||||
parser.add_argument("-s", "--swap", help="Swap space to allocate in Linux",
|
||||
default=0)
|
||||
parser.add_argument("-x", "--extras", help="Comma-separated list of extra bootstraps to run (python)",
|
||||
default="")
|
||||
|
||||
# QEMU arguments
|
||||
parser.add_argument("-q", "--qemu", help="Use QEMU",
|
||||
|
|
@ -165,6 +169,12 @@ def main():
|
|||
else:
|
||||
args.swap = 0
|
||||
|
||||
# Check extra bootstraps
|
||||
valid = ["python"]
|
||||
for extra in args.extras.split(","):
|
||||
if extra != "" and extra not in valid:
|
||||
raise ValueError(f"{extra} is not a known bootstrap")
|
||||
|
||||
# Set constant umask
|
||||
os.umask(0o022)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue