From 13b96df3507872759e6c4aaec66bfeb0b0a4a5ce Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 7 Oct 2020 19:49:47 +0200 Subject: [PATCH] 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. --- pmb/install/_install.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index 54aebc9f..42fa2468 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -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"])