From ec60ffc00e9b51c7c1966055de8259dbd2ba83a7 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Fri, 17 Dec 2010 11:49:22 +0100 Subject: [PATCH] sponsor-patch: Fix builder update logic. --- sponsor-patch | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sponsor-patch b/sponsor-patch index cfb907d..7c2612a 100755 --- a/sponsor-patch +++ b/sponsor-patch @@ -598,21 +598,24 @@ def main(script_name, bug_number, update, build, edit, keyid, upload, workdir, continue if build: + dist = re.sub("-.*$", "", changelog.distributions) + if update: - ret = builder.update() + ret = builder.update(dist) if ret != 0: Logger.error("Failed to update %s chroot for %s." % \ - (changelog.distributions, - builder.get_name())) + (dist, builder.get_name())) ask_for_manual_fixing() continue + # We want to update the build environment only once, but not + # after every manual fix. + update = False buildresult = os.path.join(workdir, task.package + "-buildresult") if not os.path.isdir(buildresult): os.makedirs(buildresult) # build package - dist = re.sub("-.*$", "", changelog.distributions) result = builder.build(new_dsc_file, dist, buildresult) if result != 0: Logger.error("Failed to build %s from source with %s." % \