You've already forked community.general
mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 07:41:16 +03:00
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>
This commit is contained in:
2
changelogs/fragments/5705-opkg-fix-force-reinstall.yml
Normal file
2
changelogs/fragments/5705-opkg-fix-force-reinstall.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- opkg - fix issue that ``force=reinstall`` would not reinstall an existing package (https://github.com/ansible-collections/community.general/pull/5705).
|
@ -154,7 +154,7 @@ def install_packages(module, opkg_path, packages):
|
|||||||
install_c = 0
|
install_c = 0
|
||||||
|
|
||||||
for package in packages:
|
for package in packages:
|
||||||
if query_package(module, opkg_path, package):
|
if query_package(module, opkg_path, package) and (force != '--force-reinstall'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
rc, out, err = module.run_command("%s install %s %s" % (opkg_path, force, package))
|
rc, out, err = module.run_command("%s install %s %s" % (opkg_path, force, package))
|
||||||
|
Reference in New Issue
Block a user