Changeset 3044 for trunk


Ignore:
Timestamp:
Jul 6, 2010, 12:28:30 AM (14 years ago)
Author:
gdb
Message:

Allow a backtracking branch to upload any package version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirtibuilder

    r3043 r3044  
    167167def uploadBuild(pocket, workdir):
    168168    """Upload all build products in the work directory."""
     169    force = config.build.pockets[pocket].get('allow_backtracking', False)
    169170    apt = b.pocketToApt(pocket)
    170171    for changes in glob.glob(os.path.join(workdir, '*.changes')):
    171         c.captureOutput(['reprepro-env',
    172                        '--ignore=wrongdistribution',
    173                        'include',
    174                        apt,
    175                        changes])
     172        upload = ['reprepro-env', '--ignore=wrongdistribution',
     173                  'include', apt, changes]
     174        try:
     175            c.captureOutput(upload)
     176        except subprocess.CalledProcessError, e:
     177            if not force:
     178                raise
     179            package = deb822.Changes(open(changes).read())['Binary']
     180            c.captureOutput(['reprepro-env', 'remove', apt, package])
     181            c.captureOutput(upload)
    176182
    177183
Note: See TracChangeset for help on using the changeset viewer.