Rename the "git" tree in the configuration to "build" to be more accurate.
authorEvan Broder <broder@mit.edu>
Tue, 15 Dec 2009 01:59:28 +0000 (20:59 -0500)
committerEvan Broder <broder@mit.edu>
Tue, 15 Dec 2009 01:59:28 +0000 (20:59 -0500)
svn path=/trunk/packages/invirt-dev/; revision=2593

invirt-build-conf
invirtibuilder
python/invirt/builder.py
repository-config/distributions.mako

index 13ce3c4..6d3430b 100755 (executable)
@@ -37,8 +37,8 @@ def main():
     conf = os.fdopen(conf_fd, 'r+')
     build_handler = '/usr/sbin/invirt-submit-build'
 
     conf = os.fdopen(conf_fd, 'r+')
     build_handler = '/usr/sbin/invirt-submit-build'
 
-    for pocket in config.git.pockets:
-        acl = authz.expandAdmin(getattr(config.git.pockets, pocket).acl, None)
+    for pocket in config.build.pockets:
+        acl = authz.expandAdmin(getattr(config.build.pockets, pocket).acl, None)
 
         acl_fd, acl_name = tempfile.mkstemp()
         acl_fd = os.fdopen(acl_fd, 'r+')
 
         acl_fd, acl_name = tempfile.mkstemp()
         acl_fd = os.fdopen(acl_fd, 'r+')
index 61efa9f..4849bee 100755 (executable)
@@ -20,7 +20,7 @@ Each queue file contains a file of the form
     pocket package hash principal
 
 where pocket is one of the pockets globally configured in
     pocket package hash principal
 
 where pocket is one of the pockets globally configured in
-git.pockets. For instance, the pockets in XVM are "prod" and "dev".
+build.pockets. For instance, the pockets in XVM are "prod" and "dev".
 
 principal is the Kerberos principal that requested the build.
 """
 
 principal is the Kerberos principal that requested the build.
 """
@@ -137,13 +137,13 @@ def tagSubmodule(pocket, package, ref, principal):
     I'm sure that long description gives you great confidence in teh
     legitimacy of my reasoning.
     """
     I'm sure that long description gives you great confidence in teh
     legitimacy of my reasoning.
     """
-    if config.git.pockets[pocket].get('allow_backtracking', False):
+    if config.build.pockets[pocket].get('allow_backtracking', False):
         env = dict(os.environ)
         branch = b.pocketToGit(pocket)
         version = b.getVersion(package, ref)
 
         env = dict(os.environ)
         branch = b.pocketToGit(pocket)
         version = b.getVersion(package, ref)
 
-        env['GIT_COMMITTER_NAME'] = config.git.tagger.name
-        env['GIT_COMMITTER_EMAIL'] = config.git.tagger.email
+        env['GIT_COMMITTER_NAME'] = config.build.tagger.name
+        env['GIT_COMMITTER_EMAIL'] = config.build.tagger.email
         tag_msg = ('Tag %s of %s\n\n'
                    'Requested by %s' % (version.full_version,
                                         package,
         tag_msg = ('Tag %s of %s\n\n'
                    'Requested by %s' % (version.full_version,
                                         package,
index e3280aa..a89acf2 100644 (file)
@@ -31,12 +31,12 @@ def getRepo(package):
 
 def pocketToGit(pocket):
     """Map a pocket in the configuration to a git branch."""
 
 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."""
 
 
 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):
 
 
 def getGitFile(package, ref, path):
@@ -88,7 +88,7 @@ def validateBuild(pocket, package, commit):
     package_repo = getRepo(package)
     new_version = getVersion(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
 
         if p == pocket:
             continue
 
@@ -105,7 +105,7 @@ def validateBuild(pocket, package, commit):
                                    'pocket %s from commit %s' %
                                    (new_version, package, p, current_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:
         branch = pocketToGit(pocket)
         current_version = getVersion(package, branch)
         if new_version <= current_version:
index 6b0d1fe..838326b 100644 (file)
@@ -2,7 +2,7 @@
 from invirt.config import structs as cfg
 from invirt import builder as b
 %>\
 from invirt.config import structs as cfg
 from invirt import builder as b
 %>\
-% for pocket in cfg.git.pockets:
+% for pocket in cfg.build.pockets:
 CodeName: ${b.pocketToApt(pocket)}
 Components: main invirt-system
 UDebComponents: main invirt-system
 CodeName: ${b.pocketToApt(pocket)}
 Components: main invirt-system
 UDebComponents: main invirt-system