mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #6548/5f968fb0 backport][stable-7] portage: fix changed_use and newuse not triggering rebuilds (#6008) (#6558)
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>
(cherry picked from commit 5f968fb075
)
Co-authored-by: s-hamann <10639154+s-hamann@users.noreply.github.com>
This commit is contained in:
parent
443d5a2a5f
commit
5b7c759552
2 changed files with 5 additions and 2 deletions
3
changelogs/fragments/6548-portage-changed_use-newuse.yml
Normal file
3
changelogs/fragments/6548-portage-changed_use-newuse.yml
Normal 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).
|
|
@ -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.')
|
||||||
|
|
Loading…
Reference in a new issue