From b49c3741bde2a3d2036837ee737446d80c7a4d18 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sun, 20 Jun 2021 08:49:49 +0200 Subject: [PATCH] [checkupdates] Use tag if version is 'Unknown' Regression from cd405cc9. Parse_androidmanifests() can return 'Unknown' or 'Ignore' if it did not find a version name. The check_tags() always returned the tag and checkupdates_app() replaced the version by the tag in the 'Unknown' case. Since cd405cc9 the tag is the hash and so the version would become the hash as well. This patch moves the 'Unknown' check directly after the Parse_androidmanifests(). --- fdroidserver/checkupdates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index 566dde00..d5a9bf17 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -207,6 +207,8 @@ def check_tags(app, pattern): root_dir = build_dir / subdir paths = common.manifest_paths(root_dir, last_build.gradle) version, vercode, _package = common.parse_androidmanifests(paths, app) + if version == 'Unknown' or version == 'Ignore': + version = tag if vercode: logging.debug("Manifest exists in subdir '{0}'. Found version {1} ({2})" .format(subdir, version, vercode)) @@ -463,8 +465,6 @@ def checkupdates_app(app): if mode.startswith('Tags'): pattern = mode[5:] if len(mode) > 4 else None (version, vercode, tag) = check_tags(app, pattern) - if version == 'Unknown': - version = tag msg = vercode elif mode == 'RepoManifest': (version, vercode) = check_repomanifest(app)