install: be slightly more efficient

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-02-20 21:49:22 -08:00
parent 00986ce080
commit 4431e1efab

View File

@ -103,13 +103,19 @@ def install_debs(ctx, debs, branch, flavor):
def _remove_deb(remote, debs):
# first ask nicely
for d in debs:
remote.run(
args=[
'sudo', 'apt-get', '-y', '--force-yes', 'purge', d,
run.Raw('||'),
'true',
])
remote.run(
args=[
'for', 'd', 'in',
] + debs + [
run.Raw(';'),
'do',
'sudo', 'apt-get', '-y', '--force-yes', 'purge',
run.Raw('$d'),
run.Raw('||'),
'true',
run.Raw(';'),
'done',
])
# mop up anything that is broken
remote.run(
args=[