init: Allow to specify extra packages that will be always installed to rootfs (#304)
This commit is contained in:
parent
d6bf0009e7
commit
8389448bfd
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue