chiark / gitweb /
The novcheck option should not bypass package id checking
authorCiaran Gultnieks <ciaran@ciarang.com>
Mon, 15 Jul 2013 13:14:06 +0000 (14:14 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Mon, 15 Jul 2013 13:14:24 +0000 (14:14 +0100)
fdroidserver/build.py

index f3c039aa9a87e10100ff0924aafc6d107fa9b89f..413b68f83c5bd363703f9f2c918dca5ae7f3b2ae 100644 (file)
@@ -475,27 +475,27 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
                         'dump', 'badging', src],
                         stdout=subprocess.PIPE)
     output = p.communicate()[0]
+
+    vercode = None
+    version = None
+    foundid = None
+    for line in output.splitlines():
+        if line.startswith("package:"):
+            pat = re.compile(".*name='([a-zA-Z0-9._]*)'.*")
+            foundid = re.match(pat, line).group(1)
+            pat = re.compile(".*versionCode='([0-9]*)'.*")
+            vercode = re.match(pat, line).group(1)
+            pat = re.compile(".*versionName='([^']*)'.*")
+            version = re.match(pat, line).group(1)
     if thisbuild.get('novcheck', 'no') == "yes":
         vercode = thisbuild['vercode']
         version = thisbuild['version']
-    else:
-        vercode = None
-        version = None
-        foundid = None
-        for line in output.splitlines():
-            if line.startswith("package:"):
-                pat = re.compile(".*name='([a-zA-Z0-9._]*)'.*")
-                foundid = re.match(pat, line).group(1)
-                pat = re.compile(".*versionCode='([0-9]*)'.*")
-                vercode = re.match(pat, line).group(1)
-                pat = re.compile(".*versionName='([^']*)'.*")
-                version = re.match(pat, line).group(1)
-        if not version or not vercode:
-            raise BuildException("Could not find version information in build in output")
-        if not foundid:
-            raise BuildException("Could not find package ID in output")
-        if foundid != app['id']:
-            raise BuildException("Wrong package ID - build " + foundid + " but expected " + app['id'])
+    if not version or not vercode:
+        raise BuildException("Could not find version information in build in output")
+    if not foundid:
+        raise BuildException("Could not find package ID in output")
+    if foundid != app['id']:
+        raise BuildException("Wrong package ID - build " + foundid + " but expected " + app['id'])
 
     # Some apps (e.g. Timeriffic) have had the bonkers idea of
     # including the entire changelog in the version number. Remove