summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authordermotbradley <dermot_bradley@yahoo.com>2021-11-08 15:43:58 +0000
committerGitHub <noreply@github.com>2021-11-08 09:43:58 -0600
commit820e3d1c1c8869aa84757bcd49b8619c17a350b1 (patch)
tree5dea7ac78763104fb4d125f3b51a831ef0d97652 /cloudinit/distros
parentdb6084bdaea263b01cdea375ba58e8f262e6c937 (diff)
downloadvyos-cloud-init-820e3d1c1c8869aa84757bcd49b8619c17a350b1.tar.gz
vyos-cloud-init-820e3d1c1c8869aa84757bcd49b8619c17a350b1.zip
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.
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/alpine.py3
1 files changed, 3 insertions, 0 deletions
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)