mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #8236/be11d0d4 backport][stable-8] Add an explicit select
option to portage
module (#8259)
Add an explicit `select` option to `portage` module (#8236)
* Add an explicit `select` option to `portage` module
This is a fix for #6226
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Default `select` option to None, making it more retrocompatible
* Add changelog fragment for the PR
* Update changelogs/fragments/8236-portage-select-feature.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit be11d0d409
)
Co-authored-by: Thomas Langé <thomas.lange.oss@gmail.com>
This commit is contained in:
parent
111593f794
commit
07953bb995
2 changed files with 13 additions and 0 deletions
2
changelogs/fragments/8236-portage-select-feature.yml
Normal file
2
changelogs/fragments/8236-portage-select-feature.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- portage - adds the possibility to explicitely tell portage to write packages to world file (https://github.com/ansible-collections/community.general/issues/6226, https://github.com/ansible-collections/community.general/pull/8236).
|
|
@ -121,6 +121,14 @@ options:
|
|||
type: bool
|
||||
default: false
|
||||
|
||||
select:
|
||||
description:
|
||||
- If set to V(true), explicitely add the package to the world file.
|
||||
- Please note that this option is not used for idempotency, it is only used
|
||||
when actually installing a package.
|
||||
type: bool
|
||||
version_added: 8.6.0
|
||||
|
||||
sync:
|
||||
description:
|
||||
- Sync package repositories first
|
||||
|
@ -374,6 +382,7 @@ def emerge_packages(module, packages):
|
|||
'loadavg': '--load-average',
|
||||
'backtrack': '--backtrack',
|
||||
'withbdeps': '--with-bdeps',
|
||||
'select': '--select',
|
||||
}
|
||||
|
||||
for flag, arg in emerge_flags.items():
|
||||
|
@ -523,6 +532,7 @@ def main():
|
|||
nodeps=dict(default=False, type='bool'),
|
||||
onlydeps=dict(default=False, type='bool'),
|
||||
depclean=dict(default=False, type='bool'),
|
||||
select=dict(default=None, type='bool'),
|
||||
quiet=dict(default=False, type='bool'),
|
||||
verbose=dict(default=False, type='bool'),
|
||||
sync=dict(default=None, choices=['yes', 'web', 'no']),
|
||||
|
@ -543,6 +553,7 @@ def main():
|
|||
['quiet', 'verbose'],
|
||||
['quietbuild', 'verbose'],
|
||||
['quietfail', 'verbose'],
|
||||
['oneshot', 'select'],
|
||||
],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue