|
|
@ -267,14 +267,14 @@ def emerge_packages(module, packages):
|
|
|
|
'verbose': '--verbose',
|
|
|
|
'verbose': '--verbose',
|
|
|
|
'getbinpkg': '--getbinpkg',
|
|
|
|
'getbinpkg': '--getbinpkg',
|
|
|
|
'usepkgonly': '--usepkgonly',
|
|
|
|
'usepkgonly': '--usepkgonly',
|
|
|
|
|
|
|
|
'usepkg': '--usepkg',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for flag, arg in emerge_flags.iteritems():
|
|
|
|
for flag, arg in emerge_flags.iteritems():
|
|
|
|
if p[flag]:
|
|
|
|
if p[flag]:
|
|
|
|
args.append(arg)
|
|
|
|
args.append(arg)
|
|
|
|
|
|
|
|
|
|
|
|
# usepkgonly implies getbinpkg
|
|
|
|
if 'usepkg' in p and 'usepkgonly' in p:
|
|
|
|
if p['usepkgonly'] and not p['getbinpkg']:
|
|
|
|
module.fail_json(msg='Use only one of usepkg, usepkgonly')
|
|
|
|
args.append('--getbinpkg')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmd, (rc, out, err) = run_emerge(module, packages, *args)
|
|
|
|
cmd, (rc, out, err) = run_emerge(module, packages, *args)
|
|
|
|
if rc != 0:
|
|
|
|
if rc != 0:
|
|
|
@ -406,6 +406,7 @@ def main():
|
|
|
|
sync=dict(default=None, choices=['yes', 'web']),
|
|
|
|
sync=dict(default=None, choices=['yes', 'web']),
|
|
|
|
getbinpkg=dict(default=None, choices=['yes']),
|
|
|
|
getbinpkg=dict(default=None, choices=['yes']),
|
|
|
|
usepkgonly=dict(default=None, choices=['yes']),
|
|
|
|
usepkgonly=dict(default=None, choices=['yes']),
|
|
|
|
|
|
|
|
usepkg=dict(default=None, choices=['yes']),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
required_one_of=[['package', 'sync', 'depclean']],
|
|
|
|
required_one_of=[['package', 'sync', 'depclean']],
|
|
|
|
mutually_exclusive=[['nodeps', 'onlydeps'], ['quiet', 'verbose']],
|
|
|
|
mutually_exclusive=[['nodeps', 'onlydeps'], ['quiet', 'verbose']],
|
|
|
|