X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dev.git/blobdiff_plain/9679ebb058b3be6f4aa3df45506380b535d9b1f6..8d17ee545fb08a3a87f5f37d7f505d789f2abb7e:/python/invirt/builder.py diff --git a/python/invirt/builder.py b/python/invirt/builder.py index 27e21a6..a89acf2 100644 --- a/python/invirt/builder.py +++ b/python/invirt/builder.py @@ -26,17 +26,17 @@ class InvalidBuild(ValueError): def getRepo(package): """Return the path to the git repo for a given package.""" - return os.path.join(_REPO_DIR, 'packages', '%s.git' % package) + return os.path.join(_REPO_DIR, 'invirt/packages', '%s.git' % package) def pocketToGit(pocket): """Map a pocket in the configuration to a git branch.""" - return config.git.pockets[pocket].get('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 config.git.pockets[pocket].get('apt', pocket) + return getattr(getattr(config.build.pockets, pocket), 'apt', pocket) def getGitFile(package, ref, path): @@ -88,7 +88,7 @@ def validateBuild(pocket, package, commit): package_repo = getRepo(package) new_version = getVersion(package, commit) - for p in config.git.pockets: + for p in config.build.pockets: if p == pocket: continue @@ -105,7 +105,7 @@ def validateBuild(pocket, package, commit): '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: