Use --quiet when running apt-get

Use the --quiet switch when running apt-get to get output suitable for
logging, rather than with pretty progress updates designed for interactive
use. This makes the log, as returned by GetConsoleOutput for instance, a
little shorter and easier to read. Some action completion notices are also
missed, but it's pretty clear still as no error output appears before
cloud-init goes on to the next thing.

Mer apt-get man page:
  Quiet; produces output suitable for logging, omitting progress indicators.
This commit is contained in:
Scott Moser 2012-06-13 09:11:27 -04:00
commit f216725b52
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
0.6.4:
- support relative path in AuthorizedKeysFile (LP: #970071).
- make apt-get update run with --quiet (suitable for logging) (LP: #1012613)
0.6.3:
- add sample systemd config files [Garrett Holmstrom]
- add Fedora support [Garrent Holstrom] (LP: #883286)

View File

@ -260,7 +260,7 @@ def apt_get(tlc, args=None):
e = os.environ.copy()
e['DEBIAN_FRONTEND'] = 'noninteractive'
cmd = ['apt-get', '--option', 'Dpkg::Options::=--force-confold',
'--assume-yes', tlc]
'--assume-yes', '--quiet', tlc]
cmd.extend(args)
subprocess.check_call(cmd, env=e)