From: Greg Brockman Date: Tue, 6 Jul 2010 04:28:30 +0000 (-0400) Subject: Allow a backtracking branch to upload any package version X-Git-Tag: 0.1.5~8 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/commitdiff_plain/79d4cc01d27a879b047dba4f682d5f3795140f82 Allow a backtracking branch to upload any package version svn path=/trunk/packages/invirt-dev/; revision=3044 --- 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):