pmbootstrap install: refactor: install_pkgs block (MR 1981)
Put all install_packages related lines into one block and fix up the comments: * The list of packages to be installed is not listed at this point (and it does not make sense there, if we would want to list it, it should be done in the next block at 'if args.build_pkgs_on_install). * Remove "including the ones specified by --add", as it doesn't add any value.
This commit is contained in:
parent
340329599b
commit
13b96df350
|
@ -672,8 +672,7 @@ def install(args):
|
||||||
# pmaports can figure out the username (legacy reasons: pmaports#820)
|
# pmaports can figure out the username (legacy reasons: pmaports#820)
|
||||||
set_user(args)
|
set_user(args)
|
||||||
|
|
||||||
# List all packages to be installed (including the ones specified by --add)
|
# Fill install_packages
|
||||||
# and upgrade the installed packages/apkindexes
|
|
||||||
install_packages = (pmb.config.install_device_packages +
|
install_packages = (pmb.config.install_device_packages +
|
||||||
["device-" + args.device] +
|
["device-" + args.device] +
|
||||||
get_kernel_package(args, args.device) +
|
get_kernel_package(args, args.device) +
|
||||||
|
@ -685,15 +684,15 @@ def install(args):
|
||||||
install_packages += ["postmarketos-ui-" + args.ui]
|
install_packages += ["postmarketos-ui-" + args.ui]
|
||||||
if args.ui_extras:
|
if args.ui_extras:
|
||||||
install_packages += ["postmarketos-ui-" + args.ui + "-extras"]
|
install_packages += ["postmarketos-ui-" + args.ui + "-extras"]
|
||||||
|
if args.extra_packages.lower() != "none":
|
||||||
|
install_packages += args.extra_packages.split(",")
|
||||||
|
if args.add:
|
||||||
|
install_packages += args.add.split(",")
|
||||||
|
|
||||||
pmb.helpers.repo.update(args, args.deviceinfo["arch"])
|
pmb.helpers.repo.update(args, args.deviceinfo["arch"])
|
||||||
|
|
||||||
# Explicitly call build on the install packages, to re-build them or any
|
# Explicitly call build on the install packages, to re-build them or any
|
||||||
# dependency, in case the version increased
|
# 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(",")
|
|
||||||
if args.build_pkgs_on_install:
|
if args.build_pkgs_on_install:
|
||||||
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"])
|
||||||
|
|
Loading…
Reference in New Issue