diff options
author | dermotbradley <dermot_bradley@yahoo.com> | 2021-11-08 15:43:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 09:43:58 -0600 |
commit | 820e3d1c1c8869aa84757bcd49b8619c17a350b1 (patch) | |
tree | 5dea7ac78763104fb4d125f3b51a831ef0d97652 /cloudinit/distros | |
parent | db6084bdaea263b01cdea375ba58e8f262e6c937 (diff) | |
download | vyos-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.py | 3 |
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) |