File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ deprecated_features :
2
+ - opkg - deprecate value ``""`` for parameter ``force`` (https://github.com/ansible-collections/community.general/pull/9172).
Original file line number Diff line number Diff line change 46
46
force:
47
47
description:
48
48
- The C(opkg --force) parameter used.
49
- - Passing V("") as value and not passing any value at all have both
50
- the same effect of B(not) using any C(--force-) parameter.
49
+ - 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.
51
50
choices:
52
51
- ""
53
52
- "depends"
@@ -152,7 +151,11 @@ def __init_module__(self):
152
151
)
153
152
154
153
def _force (value ):
154
+ # 12.0.0 function _force() to be removed entirely
155
155
if value == "" :
156
+ self .deprecate ('Value "" is deprecated. Simply omit the parameter "force" to prevent any --force-X argument when running opkg' ,
157
+ version = "12.0.0" ,
158
+ collection_name = "community.general" )
156
159
value = None
157
160
return cmd_runner_fmt .as_optval ("--force-" )(value , ctx_ignore_none = True )
158
161
@@ -164,7 +167,7 @@ def _force(value):
164
167
arg_formats = dict (
165
168
package = cmd_runner_fmt .as_list (),
166
169
state = cmd_runner_fmt .as_map (state_map ),
167
- force = cmd_runner_fmt .as_func (_force ),
170
+ force = cmd_runner_fmt .as_func (_force ), # 12.0.0 replace with cmd_runner_fmt.as_optval("--force-")
168
171
update_cache = cmd_runner_fmt .as_bool ("update" ),
169
172
version = cmd_runner_fmt .as_fixed ("--version" ),
170
173
),
You can’t perform that action at this time.
0 commit comments