X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/blobdiff_plain/e4e24100a77914be7540861e7b667e9e022bf650..75bedd64b946d859c0c6c5a3223bf333a286bb9e:/invirtibuilder diff --git a/invirtibuilder b/invirtibuilder index 65423ee..61efa9f 100755 --- a/invirtibuilder +++ b/invirtibuilder @@ -26,6 +26,8 @@ principal is the Kerberos principal that requested the build. """ +from __future__ import with_statement + import contextlib import os import re @@ -95,12 +97,7 @@ def sanitizeVersion(version): def aptCopy(packages, dst_pocket, src_pocket): """Copy a package from one pocket to another.""" - binaries = [] - for line in b.getGitFile(package, commit, 'debian/control').split('\n'): - m = re.match('Package: (.*)$') - if m: - binaries.append(m.group(1)) - + binaries = getBinaries(package, commit) cpatureOutput(['reprepro-env', 'copy', b.pocketToApt(dst_pocket), b.pocketToApt(src_pocket), @@ -185,7 +182,7 @@ def updateSuperrepo(pocket, package, commit, principal): Note that there's no locking issue here, because we disallow all pushes to the superrepo. """ - superrepo = os.path.join(b._REPO_DIR, 'packages.git') + superrepo = os.path.join(b._REPO_DIR, 'invirt/packages.git') branch = b.pocketToGit(pocket) tree = c.captureOutput(['git', 'ls-tree', branch], cwd=superrepo)