From 79d4cc01d27a879b047dba4f682d5f3795140f82 Mon Sep 17 00:00:00 2001 From: Greg Brockman Date: Tue, 6 Jul 2010 00:28:30 -0400 Subject: [PATCH] Allow a backtracking branch to upload any package version svn path=/trunk/packages/invirt-dev/; revision=3044 --- invirtibuilder | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/invirtibuilder b/invirtibuilder index ca12398..e1c3d80 100755 --- a/invirtibuilder +++ b/invirtibuilder @@ -166,13 +166,19 @@ def updateSubmoduleBranch(pocket, package, commit): def uploadBuild(pocket, workdir): """Upload all build products in the work directory.""" + force = config.build.pockets[pocket].get('allow_backtracking', False) apt = b.pocketToApt(pocket) for changes in glob.glob(os.path.join(workdir, '*.changes')): - c.captureOutput(['reprepro-env', - '--ignore=wrongdistribution', - 'include', - apt, - changes]) + upload = ['reprepro-env', '--ignore=wrongdistribution', + 'include', apt, changes] + try: + c.captureOutput(upload) + except subprocess.CalledProcessError, e: + if not force: + raise + package = deb822.Changes(open(changes).read())['Binary'] + c.captureOutput(['reprepro-env', 'remove', apt, package]) + c.captureOutput(upload) def updateSuperproject(pocket, package, commit, principal, version, env): -- 1.7.9.5