Skip to content

Commit

Permalink
opkg: fix issue that force=reinstall would not reinstall an existing …
Browse files Browse the repository at this point in the history
…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 2b39470)
  • Loading branch information
joergho authored and patchback[bot] committed Dec 19, 2022
1 parent 589e8fd commit 1ff9065
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/5705-opkg-fix-force-reinstall.yml
Original file line number Diff line number Diff line change
@@ -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).
2 changes: 1 addition & 1 deletion plugins/modules/opkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1ff9065

Please sign in to comment.