When validating builds, return True if the build validates, and don't
authorEvan Broder <broder@mit.edu>
Sat, 2 Jan 2010 00:42:01 +0000 (19:42 -0500)
committerEvan Broder <broder@mit.edu>
Sat, 2 Jan 2010 00:42:01 +0000 (19:42 -0500)
let an apt copy prevent the fast-forward and increasing-version-number
checks from running.

svn path=/trunk/packages/invirt-dev/; revision=2834

python/invirt/builder.py

index a89acf2..c1730df 100644 (file)
@@ -88,6 +88,8 @@ def validateBuild(pocket, package, commit):
     package_repo = getRepo(package)
     new_version = getVersion(package, commit)
 
     package_repo = getRepo(package)
     new_version = getVersion(package, commit)
 
+    ret = True
+
     for p in config.build.pockets:
         if p == pocket:
             continue
     for p in config.build.pockets:
         if p == pocket:
             continue
@@ -99,7 +101,7 @@ def validateBuild(pocket, package, commit):
 
         if current_version == new_version:
             if current_commit == 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' %
             else:
                 raise InvalidBuild('Version %s of %s already available in '
                                    'pocket %s from commit %s' %
@@ -120,4 +122,4 @@ def validateBuild(pocket, package, commit):
                                'commit currently in pocket %s' %
                                (commit, package, pocket))
 
                                'commit currently in pocket %s' %
                                (commit, package, pocket))
 
-
+    return ret