From f69ddafde7a292ddf334959c4407c677b65f2444 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Mon, 15 Apr 2013 11:24:31 -0700 Subject: [PATCH] Revert "Revert "Install.py: Prevent prompts from breaking apt"" This reverts commit 67a616a97927efdc4fbcc5edb0d0cf4a724d90e2. Sigh. As it turns out, /etc/default/grub being hacked also causes the same problem. I think there's a way to fix that cleanly as well, but until then, replacing the "accept installed version" hack here so jobs can run. --- teuthology/task/install.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/teuthology/task/install.py b/teuthology/task/install.py index aa98fc2be77..4255bb09ca9 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -130,7 +130,8 @@ def _update_deb_package_list_and_install(ctx, remote, debs, config): remote.run( args=[ 'sudo', 'apt-get', 'update', run.Raw('&&'), - 'sudo', 'apt-get', '-y', '--force-yes', + 'sudo', 'DEBIAN_FRONTEND=noninteractive', 'apt-get', '-y', '--force-yes', + '-o', run.Raw('Dpkg::Options::="--force-confdef"'), '-o', run.Raw('Dpkg::Options::="--force-confold"'), 'install', ] + ['%s=%s' % (d, version) for d in debs], stdout=StringIO(), @@ -212,7 +213,8 @@ def _remove_deb(remote, debs): ] + debs + [ run.Raw(';'), 'do', - 'sudo', 'apt-get', '-y', '--force-yes', 'purge', + 'sudo', 'DEBIAN_FRONTEND=noninteractive', 'apt-get', '-y', '--force-yes', + '-o', run.Raw('Dpkg::Options::="--force-confdef"'), '-o', run.Raw('Dpkg::Options::="--force-confold"'), 'purge', run.Raw('$d'), run.Raw('||'), 'true', @@ -235,7 +237,8 @@ def _remove_deb(remote, debs): # then let apt clean up remote.run( args=[ - 'sudo', 'apt-get', '-y', '--force-yes', + 'sudo', 'DEBIAN_FRONTEND=noninteractive', 'apt-get', '-y', '--force-yes', + '-o', run.Raw('Dpkg::Options::="--force-confdef"'), '-o', run.Raw('Dpkg::Options::="--force-confold"'), 'autoremove', ], stdout=StringIO(), @@ -468,7 +471,8 @@ def _upgrade_ceph_packages(ctx, remote, debs, ceph_branch): remote.run( args=[ 'sudo', 'apt-get', 'update', run.Raw('&&'), - 'sudo', 'apt-get', '-y', '--force-yes', + 'sudo', 'DEBIAN_FRONTEND=noninteractive', 'apt-get', '-y', '--force-yes', + '-o', run.Raw('Dpkg::Options::="--force-confdef"'), '-o', run.Raw('Dpkg::Options::="--force-confold"'), 'upgrade', ] + ['%s=%s' % (d, version) for d in debs], stdout=StringIO(),