forked from Mirror/pmbootstrap
install_is_necessary used to do the following things: 1. Error out if there's no binary package but pmb was invoked as "pmbootstrap install" and build_pkgs_on_install is disabled. 2. Build the package if necessary. 3. Return if a package "needs to be installed" (Boolean or Float). The only caller of the function is pmb.chroot.apk.install. It would not add the package to the long "apk add" command if according to 3. it does not need to be installed. When I implemented this a few years ago, I probably thought it would be useful to not unnecessarily pass packages to apk. But this actually makes it more complicated and doesn't have a benefit, apk is perfectly capable of recognizing which packages it had already installed. Replace the function with a much simpler pmb.chroot.apk.install_build, which only does 1. and 2. Change the order of the package, arch arguments to match called functions pmb.parse.apkindex.package and pmb.build.package. |
||
---|---|---|
.. | ||
pmb_test | ||
testdata | ||
pytest.ini | ||
static_code_analysis.sh | ||
test_apk.py | ||
test_apk_static.py | ||
test_aportgen.py | ||
test_aportgen_device_wizard.py | ||
test_arguments.py | ||
test_bootimg.py | ||
test_build_is_necessary.py | ||
test_build_package.py | ||
test_chroot_interactive_shell.py | ||
test_config_init.py | ||
test_config_pmaports.py | ||
test_config_user.py | ||
test_config_workdir.py | ||
test_cross_compile_distcc.py | ||
test_crossdirect.py | ||
test_envkernel.py | ||
test_file.py | ||
test_folder_size.py | ||
test_frontend.py | ||
test_helpers_git.py | ||
test_helpers_lint.py | ||
test_helpers_package.py | ||
test_helpers_pmaports.py | ||
test_helpers_repo.py | ||
test_helpers_repo_missing.py | ||
test_helpers_status.py | ||
test_helpers_ui.py | ||
test_install.py | ||
test_kconfig_check.py | ||
test_keys.py | ||
test_mount.py | ||
test_newapkbuild.py | ||
test_parse_apkbuild.py | ||
test_parse_apkindex.py | ||
test_parse_depends.py | ||
test_parse_deviceinfo.py | ||
test_pkgrel_bump.py | ||
test_qemu_running_processes.py | ||
test_questions.py | ||
test_run_core.py | ||
test_shell_escape.py | ||
test_version.py | ||
test_version_validate.py |