Merge pull request #8775 from AdmiralNemo/portage-changed-use
portage: Add support for --changed-use
This commit is contained in:
commit
5a5dd46812
1 changed files with 25 additions and 7 deletions
|
@ -62,6 +62,16 @@ options:
|
||||||
default: null
|
default: null
|
||||||
choices: [ "yes" ]
|
choices: [ "yes" ]
|
||||||
|
|
||||||
|
changed_use:
|
||||||
|
description:
|
||||||
|
- Include installed packages where USE flags have changed, except when
|
||||||
|
- flags that the user has not enabled are added or removed
|
||||||
|
- (--changed-use)
|
||||||
|
required: false
|
||||||
|
default: null
|
||||||
|
choices: [ "yes" ]
|
||||||
|
version_added: 1.8
|
||||||
|
|
||||||
oneshot:
|
oneshot:
|
||||||
description:
|
description:
|
||||||
- Do not add the packages to the world file (--oneshot)
|
- Do not add the packages to the world file (--oneshot)
|
||||||
|
@ -223,14 +233,21 @@ def emerge_packages(module, packages):
|
||||||
module.exit_json(changed=False, msg='Packages already present.')
|
module.exit_json(changed=False, msg='Packages already present.')
|
||||||
|
|
||||||
args = []
|
args = []
|
||||||
for flag in [
|
emerge_flags = {
|
||||||
'update', 'deep', 'newuse',
|
'update': '--update',
|
||||||
'oneshot', 'noreplace',
|
'deep': '--deep',
|
||||||
'nodeps', 'onlydeps',
|
'newuse': '--newuse',
|
||||||
'quiet', 'verbose',
|
'changed_use': '--changed-use',
|
||||||
]:
|
'oneshot': '--oneshot',
|
||||||
|
'noreplace': '--noreplace',
|
||||||
|
'nodeps': '--nodeps',
|
||||||
|
'onlydeps': '--onlydeps',
|
||||||
|
'quiet': '--quiet',
|
||||||
|
'verbose': '--verbose',
|
||||||
|
}
|
||||||
|
for flag, arg in emerge_flags.iteritems():
|
||||||
if p[flag]:
|
if p[flag]:
|
||||||
args.append('--%s' % flag)
|
args.append(arg)
|
||||||
|
|
||||||
cmd, (rc, out, err) = run_emerge(module, packages, *args)
|
cmd, (rc, out, err) = run_emerge(module, packages, *args)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
|
@ -340,6 +357,7 @@ def main():
|
||||||
update=dict(default=None, choices=['yes']),
|
update=dict(default=None, choices=['yes']),
|
||||||
deep=dict(default=None, choices=['yes']),
|
deep=dict(default=None, choices=['yes']),
|
||||||
newuse=dict(default=None, choices=['yes']),
|
newuse=dict(default=None, choices=['yes']),
|
||||||
|
changed_use=dict(default=None, choices=['yes']),
|
||||||
oneshot=dict(default=None, choices=['yes']),
|
oneshot=dict(default=None, choices=['yes']),
|
||||||
noreplace=dict(default=None, choices=['yes']),
|
noreplace=dict(default=None, choices=['yes']),
|
||||||
nodeps=dict(default=None, choices=['yes']),
|
nodeps=dict(default=None, choices=['yes']),
|
||||||
|
|
Loading…
Reference in a new issue