- c.captureOutput(['reprepro-env', 'copy',
- b.pocketToApt(dst_pocket),
- b.pocketToApt(src_pocket),
- package] + binaries)
-
-
-def sbuild(package, ref, arch, workdir, arch_all=False):
- """Build a package for a particular architecture."""
- args = ['sbuild', '-v', '-d', DISTRIBUTION, '--arch', arch]
+ logAndRun(['reprepro-env', 'copy',
+ b.pocketToApt(dst_pocket),
+ b.pocketToApt(src_pocket),
+ package] + binaries)
+
+
+def sbuild(package, ref, distro, arch, workdir, arch_all=False):
+ """Build a package for a particular architecture and distro."""
+ # We append a suffix like ~ubuntu8.04 to differentiate the same
+ # version built for multiple distros
+ nmutag = b.distroToSuffix(distro)
+ env = os.environ.copy()
+ env['NMUTAG'] = nmutag
+
+ # Run sbuild with a hack in place to append arbitrary versions
+ args = ['perl', '-I/usr/share/invirt-dev',
+ '/usr/bin/sbuild',
+ '--binNMU=171717', '--make-binNMU=Build with sbuild',
+ '-v', '-d', distro, '--arch', arch]