"""
+from __future__ import with_statement
+
import contextlib
import os
import re
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),
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)