From b0e14870fce1a2c272654a1a31fbf65f91207118 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 25 Oct 2011 20:12:48 +0200 Subject: [PATCH] correctly trigger build and sleep 60sec before doing so --- debian_build.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/debian_build.py b/debian_build.py index c6160ad..0ea5fda 100755 --- a/debian_build.py +++ b/debian_build.py @@ -15,6 +15,7 @@ import optparse import datetime import platform import subprocess +import time from glob import glob from ftplib import FTP from lib import git_helper @@ -480,6 +481,8 @@ if __name__ == '__main__': # upload dput_package_upload(changes_file) # build oot binary modules for all defined flavours + logger.info('Sleeping for 60 sec. so reprepro can process upload....') + time.sleep(60) # give reprepro time to process FLAVOURS_FILE=os.path.join(GIT_TARGET_WORKSPACE, GIT_REPO_NAME, "debian/pb_flavours") fh = open(FLAVOURS_FILE, 'r') for flavour in fh.read(): @@ -488,8 +491,23 @@ if __name__ == '__main__': '%s' % flavour, '%s' % options.distribution, '%s' % pb_suite ] - logger.info('calling %s' % cmd) - subprocess.check_call(cmd) + cmdobj = subprocess.Popen( + cmd, + shell=False, + close_fds=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + env=os.environ + ) + logger.info('calling "%s" ...', ' '.join(cmd)) + ret = os.system('%s' %(' '.join(cmd))) + if ret: + logger.error( + '"%s" returned non-zero (exitcode was: %s).', + ' '.join(cmd), + ret, + ) + return False fh.close() exit_ok() except Exception, error: -- 2.39.5