alphagov/fabric-scripts — pull request #26 by mattbostock (2014-01-22 17:33:07+00:00)
Title: Add dist-upgrade task to apt.py

Adds a new Fabric task to perform `apt-get dist-upgrade` on the specified hosts, running `apt-get update` first. Runs non-interactively and prompts for confirmation before proceeding.

The command-line switches supplied to apt-get are as follows:

- `--force-confdef` and `--force-confold` instruct `dpkg` to choose the default action when faced with installing a new version of a configuration file rather than keeping the old version. If there is no
default, in which case `dpkg` would usually prompt for a choice, prefer to keep the old version of the file.
- `-y` assumes yes to prompts such as whether to proceed with the upgrades.
- `-q` reduces the output and omits progress indicators.
- `-u` will print the list of packages to be upgraded, useful for logging or later verification.