apk: Fix failure when both install and upgrade in same command (#26666)

* apk: Fix failure when both install and upgrade in same command

If name list contains an installed package that needs upgrade plus a new package, apk command would fail due to missing space character.

* Simplify fix by concatenating lists
pull/26714/head
tdtrask 7 years ago committed by Brian Coca
parent 31b6ac896d
commit c24398cfd9

@ -242,7 +242,7 @@ def install_packages(module, names, state):
upgrade = True
if not to_install and not upgrade:
module.exit_json(changed=False, msg="package(s) already installed")
packages = " ".join(to_install) + " ".join(to_upgrade)
packages = " ".join(to_install + to_upgrade)
if upgrade:
if module.check_mode:
cmd = "%s add --upgrade --simulate %s" % (APK_PATH, packages)

Loading…
Cancel
Save