1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-18 20:50:10 +01:00

lint: check srclibs has name and @ in it

fdroiddata!2863
This commit is contained in:
Hans-Christoph Steiner 2018-01-31 13:33:06 +01:00
parent 4b0f9d6653
commit 5db86215f6

View File

@ -369,10 +369,13 @@ def check_builds(app):
yield _("Branch '{branch}' used as commit in build '{versionName}'")\ yield _("Branch '{branch}' used as commit in build '{versionName}'")\
.format(branch=s, versionName=build.versionName) .format(branch=s, versionName=build.versionName)
for srclib in build.srclibs: for srclib in build.srclibs:
ref = srclib.split('@')[1].split('/')[0] if '@' in srclib:
if ref.startswith(s): ref = srclib.split('@')[1].split('/')[0]
yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\ if ref.startswith(s):
.format(branch=s, srclib=srclib) yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
.format(branch=s, srclib=srclib)
else:
yield _('srclibs missing name and/or @') + ' (srclibs: ' + srclib + ')'
for key in build.keys(): for key in build.keys():
if key not in supported_flags: if key not in supported_flags:
yield _('%s is not an accepted build field') % key yield _('%s is not an accepted build field') % key