1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs/fragments
patchback[bot] f14e566cc7
Pkgng many packages one command (#3393) (#3529)
* pkgng: join package list into one command

Change the pkgng module so all packages being
installed (or upgraded) are acted on in one
command (per action). This will make installs
and upgrades a bit faster, because pkg will be
invoked fewer times per module run. More important,
module actions will be more atomic, making it less
likely that some packages are acted on because they
appear earlier in the argument list.

This change also improves the status reporting of
packages acted on, specifying the number of packages
for each action (install or upgrade).

* pkgng: make upgrade check lazily evaluated

Make upgrade_available an inner function so that the
if statement that checks whether installed packages
are up-to-date only runs the upgrade check on packages
that are already installed. This gets lazily evaluated
because of boolean operator short-circuiting:
https://docs.python.org/3.8/library/stdtypes.html#boolean-operations-and-or-not

Previously, the module would always check for upgrades,
even for not-installed packages, when running with
`state=latest`.

* pkgng: add changelog fragment

* pkgng: Apply changelog suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* pkgng: resolve pep8 style issue

Remove inline function. It's purpose would be confusing for
future maintainers, and someone refactoring it to a variable,
with good intentions, would introduce a performance regression.

Including the `query_update()` call in the if expression makes
the intent more legible and still ensures lazy evaluation of the
function call if the first `and` is `False`.

* pkgng: Fix changelog fragment syntax issue

Need to escape quotes so YAML doesn't eat them

Co-authored-by: Felix Fontein <felix@fontein.de>

* pkgng: Improve output message English grammar

Make word "package" plural only if reporting on more than one package

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 293c7a9fb3)

Co-authored-by: Ross Williams <ross@ross-williams.net>
2021-10-08 07:57:27 +02:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
3330-bugfix-keycloak-authentication-flow-requirements-not-set-correctly.yml.yml Keycloak: Fix bug on keycloak_authentication, requirement not always updated (#3330) (#3446) 2021-09-26 13:48:48 +02:00
3393-pkgng-many_packages_one_command.yml Pkgng many packages one command (#3393) (#3529) 2021-10-08 07:57:27 +02:00
3400-fix-gitLab-api-searches-always-return-first-found-match-3386.yml Fix: GitLab API searches always return first found match (#3400) (#3448) 2021-09-26 19:49:08 +02:00
3401-nmcli-needs-type.yml nmcli: amended the routing-rules4 key values as list (#3401) (#3467) 2021-09-29 05:45:08 +00:00
3422-open-iscsi-mutual-authentication-support.yaml open-iscsi: adding mutual authentication support and updating authentication parameters description (#3422) (#3447) 2021-09-26 13:49:02 +02:00
3425-mail_add_configurable_ehlo_hostname.yml mail: adding capability to specify ehlo hostname (#3425) (#3427) 2021-09-24 07:41:21 +02:00
3426-copy-permissions-along-with-file-for-jboss-module.yml Copy the permissions along with file for jboss module (#3426) (#3469) 2021-09-29 05:44:59 +00:00
3450-callback_opentelemetry-exception_handling.yml [opentelemetry] minor changes in the import, docs and exception (#3450) (#3491) 2021-10-01 15:08:00 +02:00
3453-fix-gitlab_group-require_two_factor_authentication-cant_be_null.yml Fix require_two_factor_authentication can't be null (#3453) (#3457) 2021-09-27 22:11:54 +02:00
3473-gitlab_deploy_key-fix_idempotency.yml Fix: gitlab_deploy_key idempotency (#3473) (#3512) 2021-10-04 21:42:04 +02:00
3474-zypper_repository_improve_repo_file_idempotency.yml zypper_repository: Improve .repo file idempotency (#3474) (#3528) 2021-10-08 07:56:34 +02:00
3478-yaml-callback.yml yaml callback: prevent plugin from modifying PyYAML (#3478) (#3494) 2021-10-02 20:22:35 +02:00
3496-callback_opentelemetry-enrich_stacktraces.yml [opentelemetry][callback] enrich stacktrace errors (#3496) (#3523) 2021-10-07 07:45:15 +02:00
3498-callback_opentelemetry-only_in_ci.yml [opentelemetry][callback] add option to support enabling plugin in the CI (#3498) (#3524) 2021-10-07 22:16:28 +02:00
3514-ufw_insert_or_delete_biased_when_deletion_enabled.yml [ufw] Insert or delete biased when deletion enabled - as for append or delete. (#3514) (#3525) 2021-10-07 22:15:40 +02:00