From: Sage Weil Date: Thu, 21 Feb 2013 05:49:22 +0000 (-0800) Subject: install: be slightly more efficient X-Git-Tag: 1.1.0~2302 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4431e1efab71f7249d620709f1ccb72da5f41044;p=teuthology.git install: be slightly more efficient Signed-off-by: Sage Weil --- diff --git a/teuthology/task/install.py b/teuthology/task/install.py index fb82a824a..8b6025fb9 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=[