From c40101a8d8801231e3a9b94c7bf541a263a82a34 Mon Sep 17 00:00:00 2001 From: Jeremiah Orem Date: Fri, 14 Jun 2013 11:30:16 -0700 Subject: [PATCH] Clean up package file. --- scripts/update/fabfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/update/fabfile.py b/scripts/update/fabfile.py index 1b852da557..d767abed89 100644 --- a/scripts/update/fabfile.py +++ b/scripts/update/fabfile.py @@ -158,13 +158,14 @@ def install_package(name, package_file): run('rpm -i %s' % package_file) run('[[ -d {0} ]] && ln -sfn {0} {1}'.format(os.path.join(INSTALL_TO, name), cur_sym)) + run('rm -f %s' % package_file) @roles(settings.WEB_HOSTGROUP, settings.CELERY_HOSTGROUP) @task def cleanup_packages(): installed = run('rpm -qa {0}-*'.format(PACKAGE_PREFIX)).split() - installed.sort() + installed.sort() for i in installed[:-KEEP_RELEASES]: if BUILD_ID not in i: @@ -231,6 +232,7 @@ def deploy(): execute(install_package, package_name, package_file) execute(restart_workers) execute(cleanup_packages) + local('rm -f %s' % package_file) with lcd(settings.SRC_DIR): local('%s manage.py cron cleanup_validation_results' % settings.PYTHON)