mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Merge branch 'bugfix/ignore-checks' into 'master'
Bugfix/ignore checks Closes #638 See merge request fdroid/fdroidserver!659
This commit is contained in:
commit
42a049cd74
2 changed files with 9 additions and 4 deletions
|
|
@ -43,6 +43,9 @@ from .exception import VCSException, NoSubmodulesException, FDroidException, Met
|
||||||
# required.
|
# required.
|
||||||
def check_http(app):
|
def check_http(app):
|
||||||
|
|
||||||
|
ignoreversions = app.UpdateCheckIgnore
|
||||||
|
ignoresearch = re.compile(ignoreversions).search if ignoreversions else None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if not app.UpdateCheckData:
|
if not app.UpdateCheckData:
|
||||||
|
|
@ -82,8 +85,9 @@ def check_http(app):
|
||||||
raise FDroidException("No RE match for version")
|
raise FDroidException("No RE match for version")
|
||||||
version = m.group(1)
|
version = m.group(1)
|
||||||
|
|
||||||
return (version, vercode)
|
if version and ignoresearch and not ignoresearch(version):
|
||||||
|
return (version, vercode)
|
||||||
|
return (None, ("Version {version} is ignored").format(version=version))
|
||||||
except FDroidException:
|
except FDroidException:
|
||||||
msg = "Could not complete http check for app {0} due to unknown error: {1}".format(app.id, traceback.format_exc())
|
msg = "Could not complete http check for app {0} due to unknown error: {1}".format(app.id, traceback.format_exc())
|
||||||
return (None, msg)
|
return (None, msg)
|
||||||
|
|
@ -351,7 +355,8 @@ def possible_subdirs(app):
|
||||||
|
|
||||||
def fetch_autoname(app, tag):
|
def fetch_autoname(app, tag):
|
||||||
|
|
||||||
if not app.RepoType or app.UpdateCheckMode in ('None', 'Static'):
|
if not app.RepoType or app.UpdateCheckMode in ('None', 'Static') \
|
||||||
|
or app.UpdateCheckName == "Ignore":
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if app.RepoType == 'srclib':
|
if app.RepoType == 'srclib':
|
||||||
|
|
|
||||||
|
|
@ -1508,7 +1508,7 @@ def parse_androidmanifests(paths, app):
|
||||||
|
|
||||||
if vercode is not None \
|
if vercode is not None \
|
||||||
and (max_vercode is None or vercode > max_vercode):
|
and (max_vercode is None or vercode > max_vercode):
|
||||||
if not ignoresearch or not ignoresearch(version):
|
if version and (not ignoresearch or not ignoresearch(version)):
|
||||||
if version is not None:
|
if version is not None:
|
||||||
max_version = version
|
max_version = version
|
||||||
if vercode is not None:
|
if vercode is not None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue