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').
This commit is contained in:
parent
fa8883e7fa
commit
b80c0bf5c2
|
@ -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)
|
||||
|
|
|
@ -125,6 +125,19 @@ apt_sources:
|
|||
=Y2oI
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
# apt_get_command: [command, argument, argument]
|
||||
# Specify a different 'apt-get' command. must be a list. subcommands are
|
||||
# appended to it. default is:
|
||||
# ['apt-get', '--option=Dpkg::Options::=--force-confold',
|
||||
# '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet']
|
||||
#
|
||||
# apt_get_upgrade_subcommand:
|
||||
# Specify a different 'apt-get upgrade' subcommand. when 'apt_upgrade' or
|
||||
# package_upgrade is set to true above, then this subcommand will be invoked.
|
||||
# default is 'dist-upgrade'. For example, you could set this to 'upgrade'.
|
||||
apt_get_upgrade_subcommand: dist-upgrade
|
||||
|
||||
|
||||
# Install additional packages on first boot
|
||||
#
|
||||
# Default: none
|
||||
|
|
Loading…
Reference in New Issue