From 820e3d1c1c8869aa84757bcd49b8619c17a350b1 Mon Sep 17 00:00:00 2001 From: dermotbradley Date: Mon, 8 Nov 2021 15:43:58 +0000 Subject: alpine.py: add options to the apk upgrade command (#1089) Whenever "apk upgrade" is triggered also use the "--available" and "--update-cache" options to ensure that an up-to-date packages list is used. --- cloudinit/distros/alpine.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cloudinit/distros/alpine.py b/cloudinit/distros/alpine.py index 73b68baf..e82965fd 100644 --- a/cloudinit/distros/alpine.py +++ b/cloudinit/distros/alpine.py @@ -128,6 +128,9 @@ class Distro(distros.Distro): if command: cmd.append(command) + if command == 'upgrade': + cmd.extend(["--update-cache", "--available"]) + pkglist = util.expand_package_list('%s-%s', pkgs) cmd.extend(pkglist) -- cgit v1.2.3