From 05c22e4f202332332de051e6849bbf5210aa19f6 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 3 Apr 2013 16:06:43 -0500 Subject: invoke 'dist-upgrade' instead of 'upgrade' on for upgrades. In general, dist-upgrade is the correct behavior here. It will get a new kernel, though, which could be annoying. So, allow a way to turn it off (by setting 'apt_get_upgrade_subcommand: upgrade'). LP: #1164147 --- cloudinit/distros/debian.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cloudinit/distros') diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index 4b779d57..a1e28ad5 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -161,7 +161,13 @@ class Distro(distros.Distro): elif args and isinstance(args, list): cmd.extend(args) - cmd.append(command) + + subcmd = command + if command == "upgrade": + subcmd = self.get_option("apt_get_upgrade_subcommand", + "dist-upgrade") + + cmd.append(subcmd) pkglist = util.expand_package_list('%s=%s', pkgs) cmd.extend(pkglist) -- cgit v1.2.3