mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-06 14:14:22 -07:00
[PR #5705/2b39470a backport][stable-6] opkg: fix issue that force=reinstall would not reinstall an existing package (#5711)
opkg: fix issue that force=reinstall would not reinstall an existing package (#5705)
* opkg: fix issue that force=reinstall would not reinstall an existing package
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
* changelog fragment
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
(cherry picked from commit 2b39470a77
)
Co-authored-by: joergho <48011876+joergho@users.noreply.github.com>
This commit is contained in:
parent
589e8fd5e1
commit
82f4b51873
2 changed files with 3 additions and 1 deletions
|
@ -154,7 +154,7 @@ def install_packages(module, opkg_path, packages):
|
|||
install_c = 0
|
||||
|
||||
for package in packages:
|
||||
if query_package(module, opkg_path, package):
|
||||
if query_package(module, opkg_path, package) and (force != '--force-reinstall'):
|
||||
continue
|
||||
|
||||
rc, out, err = module.run_command("%s install %s %s" % (opkg_path, force, package))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue