Skip to content
Snippets Groups Projects
Commit 8389448b authored by Pablo Castellano's avatar Pablo Castellano Committed by Oliver Smith
Browse files

init: Allow to specify extra packages that will be always installed to rootfs (#304)

parent d6bf0009
Branches
Tags
No related merge requests found
......@@ -46,6 +46,7 @@ defaults = {
"aports": os.path.normpath(pmb_src + "/aports"),
"config": os.path.expanduser("~") + "/.config/pmbootstrap.cfg",
"device": "samsung-i9100",
"extra_packages": "none",
"timestamp_based_rebuild": True,
"log": "$WORK/log.txt",
"mirror_alpine": "https://nl.alpinelinux.org/alpine/",
......
......@@ -92,6 +92,14 @@ def init(args):
default=args.timestamp_based_rebuild)
cfg["pmbootstrap"]["timestamp_based_rebuild"] = str(answer)
# Extra packages to be installed to rootfs
logging.info("Additional packages that will be installed to rootfs."
" Specify them in a comma separated list (e.g.: vim,file)"
" or \"none\"")
cfg["pmbootstrap"]["extra_packages"] = pmb.helpers.cli.ask(args, "Extra packages",
None, args.extra_packages,
validation_regex="^(|[-\w\s]+(?:,[-\w\s]*)*)$")
# Do not save aports location to config file
del cfg["pmbootstrap"]["aports"]
......
......@@ -97,6 +97,8 @@ def install(args):
# Explicitly call build on the install packages, to re-build them or any
# dependency, in case the version increased
if args.extra_packages.lower() != "none":
install_packages += args.extra_packages.split(",")
if args.add:
install_packages += args.add.split(",")
for pkgname in install_packages:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment