1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

portage: fix changed_use and newuse not triggering rebuilds (#6008) (#6548)

* portage: fix changed_use and newuse not triggering rebuilds (#6008)

* Add changelog fragment

* Update changelogs/fragments/6548-portage-changed_use-newuse.yml

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
s-hamann 2023-05-21 19:36:46 +00:00 committed by GitHub
parent cb1e6376db
commit 5f968fb075
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- portage - fix ``changed_use`` and ``newuse`` not triggering rebuilds (https://github.com/ansible-collections/community.general/issues/6008, https://github.com/ansible-collections/community.general/pull/6548).

View file

@ -333,9 +333,9 @@ def emerge_packages(module, packages):
"""Run emerge command against given list of atoms.""" """Run emerge command against given list of atoms."""
p = module.params p = module.params
if p['noreplace'] and not (p['update'] or p['state'] == 'latest'): if p['noreplace'] and not p['changed_use'] and not p['newuse'] and not (p['update'] or p['state'] == 'latest'):
for package in packages: for package in packages:
if p['noreplace'] and not query_package(module, package, 'emerge'): if p['noreplace'] and not p['changed_use'] and not p['newuse'] and not query_package(module, package, 'emerge'):
break break
else: else:
module.exit_json(changed=False, msg='Packages already present.') module.exit_json(changed=False, msg='Packages already present.')