summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-03-08 10:52:11 -0500
committerScott Moser <smoser@ubuntu.com>2011-03-08 10:52:11 -0500
commita3d13c470357b4a87656ba2520d75bbcbc94a246 (patch)
tree8af130c0706408a8ede1970cdd0f2897a3a44bbb
parent1e02db238117f1b7c0a30f6b6d0cad64c4dbe3a7 (diff)
downloadvyos-cloud-init-a3d13c470357b4a87656ba2520d75bbcbc94a246.tar.gz
vyos-cloud-init-a3d13c470357b4a87656ba2520d75bbcbc94a246.zip
fix issue where apt-update was not done unless explicitly set
-rw-r--r--ChangeLog3
-rw-r--r--cloudinit/CloudConfig/cc_apt_update_upgrade.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2452ba3f..fa5e1bc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+0.6.2:
+ - fix bug where update was not done unless update was explicitly set.
+ It would not be run if 'upgrade' or packages were set to be installed
0.6.1:
- fix bug in fixing permission on /var/log/cloud-init.log (LP: #704509)
- improve comment strings in rsyslog file tools/21-cloudinit.conf
diff --git a/cloudinit/CloudConfig/cc_apt_update_upgrade.py b/cloudinit/CloudConfig/cc_apt_update_upgrade.py
index f361b8a4..495b8522 100644
--- a/cloudinit/CloudConfig/cc_apt_update_upgrade.py
+++ b/cloudinit/CloudConfig/cc_apt_update_upgrade.py
@@ -55,8 +55,10 @@ def handle(name,cfg,cloud,log,args):
log.error("Failed to run debconf-set-selections")
log.debug(traceback.format_exc())
+ pkglist = util.get_cfg_option_list_or_str(cfg,'packages',[])
+
errors = [ ]
- if update:
+ if update or len(pkglist) or upgrade:
try:
cc.update_package_sources()
except subprocess.CalledProcessError as e:
@@ -72,7 +74,6 @@ def handle(name,cfg,cloud,log,args):
log.debug(traceback.format_exc())
errors.append(e)
- pkglist = util.get_cfg_option_list_or_str(cfg,'packages',[])
if len(pkglist):
try:
cc.install_packages(pkglist)