mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
The novcheck option should not bypass package id checking
This commit is contained in:
parent
73ef03b7d4
commit
e676e34c12
1 changed files with 18 additions and 18 deletions
|
|
@ -475,27 +475,27 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
'dump', 'badging', src],
|
'dump', 'badging', src],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
output = p.communicate()[0]
|
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":
|
if thisbuild.get('novcheck', 'no') == "yes":
|
||||||
vercode = thisbuild['vercode']
|
vercode = thisbuild['vercode']
|
||||||
version = thisbuild['version']
|
version = thisbuild['version']
|
||||||
else:
|
if not version or not vercode:
|
||||||
vercode = None
|
raise BuildException("Could not find version information in build in output")
|
||||||
version = None
|
if not foundid:
|
||||||
foundid = None
|
raise BuildException("Could not find package ID in output")
|
||||||
for line in output.splitlines():
|
if foundid != app['id']:
|
||||||
if line.startswith("package:"):
|
raise BuildException("Wrong package ID - build " + foundid + " but expected " + app['id'])
|
||||||
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'])
|
|
||||||
|
|
||||||
# Some apps (e.g. Timeriffic) have had the bonkers idea of
|
# Some apps (e.g. Timeriffic) have had the bonkers idea of
|
||||||
# including the entire changelog in the version number. Remove
|
# including the entire changelog in the version number. Remove
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue