def sbuild(package, ref, arch, workdir, arch_all=False):
"""Build a package for a particular architecture."""
- args = ['sbuild', '-d', DISTRIBUTION, '--arch', arch]
+ args = ['sbuild', '-v', '-d', DISTRIBUTION, '--arch', arch]
if arch_all:
args.append('-A')
args.append(getDscName(package, ref))
- c.captureOutput(args, cwd=workdir, stdout=None)
+ c.captureOutput(args, cwd=workdir)
def sbuildAll(package, ref, workdir):
try:
db.failed_stage = 'validating job'
- src = b.validateBuild(pocket, package, commit)
# Don't expand the commit in the DB until we're sure the user
# isn't trying to be tricky.
- db.commit = commit = c.captureOutput(['git', 'rev-parse', commit],
- cwd=b.getRepo(package)).strip()
+ b.ensureValidPackage(package)
+ db.commit = commit = b.canonicalize_commit(package, commit)
+ src = b.validateBuild(pocket, package, commit)
db.version = str(b.getVersion(package, commit))
if not os.path.exists(logdir):
os.makedirs(logdir)
- for log in glob.glob(os.path.join(workdir, '*.build')):
- os.copy2(log, logdir)
+ for log in glob.glob(os.path.join(workdir, 'build-*.log')):
+ os.copy(log, logdir)
db.failed_stage = 'processing metadata'
env = dict(os.environ)