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:
Oliver Smith 2020-10-07 19:49:47 +02:00 committed by Martijn Braam
parent 340329599b
commit 13b96df350
No known key found for this signature in database
GPG Key ID: C4280ACB000B060F
1 changed files with 5 additions and 6 deletions

View File

@ -672,8 +672,7 @@ def install(args):
# pmaports can figure out the username (legacy reasons: pmaports#820)
set_user(args)
# List all packages to be installed (including the ones specified by --add)
# and upgrade the installed packages/apkindexes
# Fill install_packages
install_packages = (pmb.config.install_device_packages +
["device-" + args.device] +
get_kernel_package(args, args.device) +
@ -685,15 +684,15 @@ def install(args):
install_packages += ["postmarketos-ui-" + args.ui]
if 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"])
# 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(",")
if args.build_pkgs_on_install:
for pkgname in install_packages:
pmb.build.package(args, pkgname, args.deviceinfo["arch"])