mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 12:03:58 -07:00
Greatly speed up homebrew module when multiple packages are passed in the `name` key (#9181)
* Increase test coverage and assert output more strictly
* Remove unused `_current_package_is_installed_from_head`
* Remove `un/changed_count` and infer from un/changed_pkgs length
* Track `installed` & `outdated` package state once
* Validate package names beforehand
* Install packages in 1 brew call instead of N
This also has the side effect of fixing the check message so that it prints every packages that will be installed instead of only the first one.
* Uninstall packages in 1 brew call instead of N
* Link packages in 1 brew call instead of N
* Unlink packages in 1 brew call instead of N
* Upgrade packages in 1 brew call instead of N
* Remove dangling checks
* Remove `_status` method and directly return the tuple
* Add changelog fragment
* Fix invalid format string (nice catch pylint!)
* Update changelogs/fragments/9181-improve-homebrew-module-performance.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update brew info parsing for casks
* Update changelogs/fragments/9181-improve-homebrew-module-performance.yml
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
.keep | ||
10.1.0.yml | ||
5932-launchd-plist.yml | ||
7402-proxmox-template-support-server-side-artifact-fetching.yaml | ||
9076-remove-duplicated-homebrew-package-name-validation.yml | ||
9096-alternatives-add-family-parameter.yml | ||
9123-redfish-command-custom-oem-params.yml | ||
9124-dnf_config_manager.yml | ||
9128-homebrew_cask-name-regex-fix.yml | ||
9132-cloudflare_dns-comment-and-tags.yml | ||
9157-fix-dnf_config_manager-locale.yml | ||
9159-iso-extract_add_password.yml | ||
9167-rpm_ostree_pkg-apply_live.yml | ||
9171-gio-mime-fix-version.yml | ||
9179-deps-tests.yml | ||
9180-pipx-version.yml | ||
9181-improve-homebrew-module-performance.yml | ||
9186-fix-broken-check-mode-in-github-key.yml | ||
9187-flatpak-lang.yml | ||
9189-scalway-lb-simplify-return.yml | ||
9198-fail-if-slack-api-response-is-not-ok-with-error-message.yml |