From 4431e1efab71f7249d620709f1ccb72da5f41044 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 20 Feb 2013 21:49:22 -0800 Subject: [PATCH] install: be slightly more efficient Signed-off-by: Sage Weil --- teuthology/task/install.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/teuthology/task/install.py b/teuthology/task/install.py index fb82a824a1e..8b6025fb9fd 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -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=[