-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read_packages_file: include unavailable pkgs & simplify refresh_all_pkgapp_status #2557
Conversation
refresh_all_pkgapp_status: remove duplicate code and run refresh_pkgapp_status on each app with optimizations refresh_pkgapp_status: add arguments for installed and available, likely to be removed before merge
these changes regress performance compared to the current implementation on |
so it is better to lie about the packages that will be installed then (eg: neither OR case are available and you output the first anyway)? how does this assist the user? I think you have an identity crisis with the |
Co-Authored-By: Botspot <[email protected]>
Co-Authored-By: Botspot <[email protected]>
pick performance patches from #2557 if a secondary OR package is already installed and the first is not, list that as required instead of the first don't redefine $arch, remove -qq flag 4 places in api use apt-cache policy, only 1 has -qq so it's probably fine to remove it. Otherwise it should go everywhere. Co-Authored-By: Botspot <[email protected]>
pick performance patches from #2557 if a secondary OR package is already installed and the first is not, list that as required instead of the first don't redefine $arch, remove -qq flag 4 places in api use apt-cache policy, only 1 has -qq so it's probably fine to remove it. Otherwise it should go everywhere. check if `packages_file_required` is empty before attempting to install packages with manage script Co-Authored-By: Botspot <[email protected]>
pick performance patches from #2557 if a secondary OR package is already installed and the first is not, list that as required instead of the first don't redefine $arch, remove -qq flag 4 places in api use apt-cache policy, only 1 has -qq so it's probably fine to remove it. Otherwise it should go everywhere. check if `packages_file_required` is empty before attempting to install packages with manage script Co-Authored-By: Botspot <[email protected]>
read_packages_file
should be as thin a layer of translation as possible - playing the same role ascat
'ing the app'spackages
file. It should not pull out unavailable packages or return nothing if one of the required packages are unavailable.This has 3 advantages:
manage
, the error from apt will be helpful, rather than saying no packages were specified.About the changes to the
refresh_all_pkgapp_status
function:The current api on master completes
refresh_all_pkgapp_status
in 0.773+ seconds.With this change,
refresh_all_pkgapp_status
completes in 0.624+ seconds. All while removing the duplicate codepath that combined features fromread_packages_file
,package_available
, andrefresh_pkgapp_status
.This is accomplished by redefining the
package_available
andpackage_installed
functions in a bulk-friendly way for subprocesses to use, avoiding the need for a big pile of logic copied from where they belong in other functions.Other changes:
refresh_pkgapp_status
where it would skip showing an app if it is hidden but now installed. (Necessary for systems that havechromium
available and installed)refresh_pkgapp_status
to specify the app's availability and installed status. That is a lot more comprehensible than the optional package input which can be left blank to force app-hiding.$arch
variable. Use$dpkg_arch
instead. This is mostly to prevent my future self from ever getting confused about this again.