Bump version of main to 12.0.0; execute announced deprecations (#10883)

* Bump version to 12.0.0.

* Remove deprecated modules and plugins.

* state is now required.

* Change default of prepend_hash from auto to never.

* Remove support for force=''.

* Always delegate 'debug'.

* Remove ignore_value_none and ctx_ignore_none parameters.

* Remove parameters on_success and on_failure.

* Update BOTMETA.

* Adjust docs reference.

* Forgot required=True.

* Fix changelog fragment.

* Adjust unit tests.

* Fix changelog.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
Felix Fontein 2025-10-09 13:50:07 +02:00 committed by GitHub
commit 0b72737cab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 43 additions and 901 deletions

View file

@ -43,10 +43,7 @@ options:
force:
description:
- The C(opkg --force) parameter used.
- State V("") is deprecated and will be removed in community.general 12.0.0. Please omit the parameter O(force) to obtain
the same behavior.
choices:
- ""
- "depends"
- "maintainer"
- "reinstall"
@ -128,7 +125,7 @@ class Opkg(StateModuleHelper):
argument_spec=dict(
name=dict(aliases=["pkg"], required=True, type="list", elements="str"),
state=dict(default="present", choices=["present", "installed", "absent", "removed"]),
force=dict(choices=["", "depends", "maintainer", "reinstall", "overwrite", "downgrade", "space",
force=dict(choices=["depends", "maintainer", "reinstall", "overwrite", "downgrade", "space",
"postinstall", "remove", "checksum", "removal-of-dependent-packages"]),
update_cache=dict(default=False, type='bool'),
executable=dict(type="path"),
@ -147,15 +144,6 @@ class Opkg(StateModuleHelper):
removed="remove",
)
def _force(value):
# 12.0.0 function _force() to be removed entirely
if value == "":
self.deprecate('Value "" is deprecated. Simply omit the parameter "force" to prevent any --force-X argument when running opkg',
version="12.0.0",
collection_name="community.general")
value = None
return cmd_runner_fmt.as_optval("--force-")(value, ctx_ignore_none=True)
dir, cmd = os.path.split(self.vars.executable) if self.vars.executable else (None, "opkg")
self.runner = CmdRunner(
@ -164,7 +152,7 @@ class Opkg(StateModuleHelper):
arg_formats=dict(
package=cmd_runner_fmt.as_list(),
state=cmd_runner_fmt.as_map(state_map),
force=cmd_runner_fmt.as_func(_force), # 12.0.0 replace with cmd_runner_fmt.as_optval("--force-")
force=cmd_runner_fmt.as_optval("--force-"),
update_cache=cmd_runner_fmt.as_bool("update"),
version=cmd_runner_fmt.as_fixed("--version"),
),