svn path=/trunk/packages/invirt-dev/; revision=3044
def uploadBuild(pocket, workdir):
"""Upload all build products in the work directory."""
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')):
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):
def updateSuperproject(pocket, package, commit, principal, version, env):