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))