X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/blobdiff_plain/479b1cb73a333fa76e7d05f4000eb6267d8682c6..64bd9d9c871b7f218f46d5d949b67d6140ff22bc:/python/invirt/builder.py diff --git a/python/invirt/builder.py b/python/invirt/builder.py index e3280aa..c1730df 100644 --- a/python/invirt/builder.py +++ b/python/invirt/builder.py @@ -31,12 +31,12 @@ def getRepo(package): def pocketToGit(pocket): """Map a pocket in the configuration to a git branch.""" - return getattr(getattr(config.git.pockets, pocket), 'git', pocket) + return getattr(getattr(config.build.pockets, pocket), 'git', pocket) def pocketToApt(pocket): """Map a pocket in the configuration to an apt repo pocket.""" - return getattr(getattr(config.git.pockets, pocket), 'apt', pocket) + return getattr(getattr(config.build.pockets, pocket), 'apt', pocket) def getGitFile(package, ref, path): @@ -88,7 +88,9 @@ def validateBuild(pocket, package, commit): package_repo = getRepo(package) new_version = getVersion(package, commit) - for p in config.git.pockets: + ret = True + + for p in config.build.pockets: if p == pocket: continue @@ -99,13 +101,13 @@ def validateBuild(pocket, package, commit): if current_version == new_version: if current_commit == commit: - return p + ret = p else: raise InvalidBuild('Version %s of %s already available in ' 'pocket %s from commit %s' % (new_version, package, p, current_commit)) - if config.git.pockets[pocket].get('allow_backtracking', False): + if config.build.pockets[pocket].get('allow_backtracking', False): branch = pocketToGit(pocket) current_version = getVersion(package, branch) if new_version <= current_version: @@ -120,4 +122,4 @@ def validateBuild(pocket, package, commit): 'commit currently in pocket %s' % (commit, package, pocket)) - + return ret