- Timestamp:
- Jul 6, 2010, 12:27:41 AM (14 years ago)
- Location:
- trunk/packages/invirt-dev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-dev/invirt-submit-build
r3028 r3035 42 42 43 43 try: 44 # TODO: clean up this interface. 45 b.ensureValidPackage(package) 46 commit = b.canonicalize_commit(package, commit) 44 47 b.validateBuild(pocket, package, commit) 45 48 except b.InvalidBuild, e: -
trunk/packages/invirt-dev/invirtibuilder
r3032 r3035 289 289 try: 290 290 db.failed_stage = 'validating job' 291 src = b.validateBuild(pocket, package, commit)292 291 # Don't expand the commit in the DB until we're sure the user 293 292 # isn't trying to be tricky. 294 db.commit = commit = c.captureOutput(['git', 'rev-parse', commit], 295 cwd=b.getRepo(package)).strip() 293 b.ensureValidPackage(package) 294 db.commit = commit = b.canonicalize_commit(package, commit) 295 src = b.validateBuild(pocket, package, commit) 296 296 297 297 db.version = str(b.getVersion(package, commit)) -
trunk/packages/invirt-dev/python/invirt/builder.py
r3028 r3035 29 29 return os.path.join(_REPO_DIR, 'invirt/packages', '%s.git' % package) 30 30 31 def ensureValid Repo(package):31 def ensureValidPackage(package): 32 32 """Perform some basic sanity checks that the requested repo is in a 33 33 subdirectory of _REPO_DIR/invirt/packages. This prevents weirdness … … 42 42 elif not os.path.exists(repo): 43 43 raise InvalidBuild('Nonexisting package %s' % package) 44 45 def canonicalize_commit(package, commit, shorten=False): 46 if shorten: 47 flags = ['--short'] 48 else: 49 flags = [] 50 return c.captureOutput(['git', 'rev-parse'] + flags + [commit], 51 cwd=getRepo(package)).strip() 44 52 45 53 def pocketToGit(pocket): … … 99 107 it returns True. 100 108 """ 101 ensureValid Repo(package)109 ensureValidPackage(package) 102 110 package_repo = getRepo(package) 103 111 new_version = getVersion(package, commit)
Note: See TracChangeset
for help on using the changeset viewer.