Fix 67: New '--add' parameter for 'pmbootstrap install' to add custom packages.
Example usage: ./pmbootstrap install --add='vim,gcc'
This commit is contained in:
parent
5016c196ba
commit
9515782f8d
|
@ -82,17 +82,22 @@ def install(args, show_flash_msg=True):
|
||||||
pmb.chroot.apk.install(args, pmb.config.install_native_packages,
|
pmb.chroot.apk.install(args, pmb.config.install_native_packages,
|
||||||
build=False)
|
build=False)
|
||||||
|
|
||||||
# Explicitly call build on the install packages, to re-build it or any
|
# List all packages to be installed (including the ones specified by --add)
|
||||||
# dependency, in case the version increased
|
# and upgrade the installed packages/apkindexes
|
||||||
logging.info("*** (2/5) CREATE DEVICE ROOTFS (" + args.device + ") ***")
|
logging.info("*** (2/5) CREATE DEVICE ROOTFS (" + args.device + ") ***")
|
||||||
install_packages = pmb.config.install_device_packages + ["device-" + args.device]
|
install_packages = (pmb.config.install_device_packages + ["device-" + args.device])
|
||||||
|
suffix = "rootfs_" + args.device
|
||||||
|
pmb.chroot.apk.upgrade(args, suffix)
|
||||||
|
|
||||||
|
# Explicitly call build on the install packages, to re-build them or any
|
||||||
|
# dependency, in case the version increased
|
||||||
|
if args.add:
|
||||||
|
install_packages += args.add.split(",")
|
||||||
for pkgname in install_packages:
|
for pkgname in install_packages:
|
||||||
pmb.build.package(args, pkgname, args.deviceinfo["arch"])
|
pmb.build.package(args, pkgname, args.deviceinfo["arch"])
|
||||||
|
|
||||||
# Install all packages to device rootfs chroot
|
# Install all packages to device rootfs chroot
|
||||||
suffix = "rootfs_" + args.device
|
|
||||||
pmb.chroot.apk.install(args, install_packages, suffix)
|
pmb.chroot.apk.install(args, install_packages, suffix)
|
||||||
pmb.chroot.apk.upgrade(args, suffix)
|
|
||||||
set_user_password(args)
|
set_user_password(args)
|
||||||
|
|
||||||
# Partition and fill image/sdcard
|
# Partition and fill image/sdcard
|
||||||
|
|
|
@ -108,6 +108,8 @@ def arguments():
|
||||||
" eg. /dev/mmcblk0")
|
" eg. /dev/mmcblk0")
|
||||||
install.add_argument("--cipher", help="cryptsetup cipher used to"
|
install.add_argument("--cipher", help="cryptsetup cipher used to"
|
||||||
" encrypt the system partition, eg. aes-xts-plain64")
|
" encrypt the system partition, eg. aes-xts-plain64")
|
||||||
|
install.add_argument("--add", help="comma separated list of packages to be"
|
||||||
|
" added to the rootfs (e.g. 'vim,gcc')")
|
||||||
|
|
||||||
# Action: build / checksum / menuconfig / parse_apkbuild / aportgen
|
# Action: build / checksum / menuconfig / parse_apkbuild / aportgen
|
||||||
menuconfig = sub.add_parser("menuconfig", help="run menuconfig on"
|
menuconfig = sub.add_parser("menuconfig", help="run menuconfig on"
|
||||||
|
|
Loading…
Reference in New Issue