Update the packaging to build and install the invirtibuilder.
[invirt/packages/invirt-dev.git] / invirtibuilder
index 65423ee..0a19484 100755 (executable)
@@ -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),