Use boolean instead of "yes" + choice for most option

This enable a more standard behavior with others modules
This commit is contained in:
Michael Scherer 2016-03-28 09:14:57 +02:00
parent 2d481c93ee
commit 9853caa536

View file

@ -76,29 +76,29 @@ options:
description: description:
- Do not add the packages to the world file (--oneshot) - Do not add the packages to the world file (--oneshot)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
noreplace: noreplace:
description: description:
- Do not re-emerge installed packages (--noreplace) - Do not re-emerge installed packages (--noreplace)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
nodeps: nodeps:
description: description:
- Only merge packages but not their dependencies (--nodeps) - Only merge packages but not their dependencies (--nodeps)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
onlydeps: onlydeps:
description: description:
- Only merge packages' dependencies but not the packages (--onlydeps) - Only merge packages' dependencies but not the packages (--onlydeps)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
depclean: depclean:
description: description:
@ -106,22 +106,22 @@ options:
- If no package is specified, clean up the world's dependencies - If no package is specified, clean up the world's dependencies
- Otherwise, --depclean serves as a dependency aware version of --unmerge - Otherwise, --depclean serves as a dependency aware version of --unmerge
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
quiet: quiet:
description: description:
- Run emerge in quiet mode (--quiet) - Run emerge in quiet mode (--quiet)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
verbose: verbose:
description: description:
- Run emerge in verbose mode (--verbose) - Run emerge in verbose mode (--verbose)
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
sync: sync:
description: description:
@ -130,21 +130,21 @@ options:
- If web, perform "emerge-webrsync" - If web, perform "emerge-webrsync"
required: false required: false
default: null default: null
choices: [ "yes", "web" ] choices: [ "yes", "web", "no" ]
getbinpkg: getbinpkg:
description: description:
- Prefer packages specified at PORTAGE_BINHOST in make.conf - Prefer packages specified at PORTAGE_BINHOST in make.conf
required: false required: false
default: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
usepkgonly: usepkgonly:
description: description:
- Merge only binaries (no compiling). This sets getbinpkg=yes. - Merge only binaries (no compiling). This sets getbinpkg=yes.
required: false required: false
deafult: null default: False
choices: [ "yes" ] choices: [ "yes", "no" ]
requirements: [ gentoolkit ] requirements: [ gentoolkit ]
author: author:
@ -401,21 +401,21 @@ def main():
default=portage_present_states[0], default=portage_present_states[0],
choices=portage_present_states + portage_absent_states, choices=portage_present_states + portage_absent_states,
), ),
update=dict(default=None, choices=['yes']), update=dict(default=False, type='bool'),
deep=dict(default=None, choices=['yes']), deep=dict(default=False, type='bool'),
newuse=dict(default=None, choices=['yes']), newuse=dict(default=False, type='bool'),
changed_use=dict(default=None, choices=['yes']), changed_use=dict(default=False, type='bool'),
oneshot=dict(default=None, choices=['yes']), oneshot=dict(default=False, type='bool'),
noreplace=dict(default=None, choices=['yes']), noreplace=dict(default=False, type='bool'),
nodeps=dict(default=None, choices=['yes']), nodeps=dict(default=False, type='bool'),
onlydeps=dict(default=None, choices=['yes']), onlydeps=dict(default=False, type='bool'),
depclean=dict(default=None, choices=['yes']), depclean=dict(default=False, type='bool'),
quiet=dict(default=None, choices=['yes']), quiet=dict(default=False, type='bool'),
verbose=dict(default=None, choices=['yes']), verbose=dict(default=False, type='bool'),
sync=dict(default=None, choices=['yes', 'web']), sync=dict(default=None, choices=['yes', 'web']),
getbinpkg=dict(default=None, choices=['yes']), getbinpkg=dict(default=False, type='bool'),
usepkgonly=dict(default=None, choices=['yes']), usepkgonly=dict(default=False, type='bool'),
usepkg=dict(default=None, choices=['yes']), usepkg=dict(default=False, type='bool'),
), ),
required_one_of=[['package', 'sync', 'depclean']], required_one_of=[['package', 'sync', 'depclean']],
mutually_exclusive=[['nodeps', 'onlydeps'], ['quiet', 'verbose']], mutually_exclusive=[['nodeps', 'onlydeps'], ['quiet', 'verbose']],