mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
checkupdates: Make RepoManifest change subdir too
This commit is contained in:
parent
af947809b5
commit
d5ec039dec
1 changed files with 19 additions and 24 deletions
|
|
@ -201,37 +201,32 @@ def check_repomanifest(app, branch=None):
|
||||||
elif repotype == 'bzr':
|
elif repotype == 'bzr':
|
||||||
vcs.gotorevision(None)
|
vcs.gotorevision(None)
|
||||||
|
|
||||||
root_dir = build_dir
|
|
||||||
flavours = []
|
flavours = []
|
||||||
if len(app['builds']) > 0:
|
if len(app['builds']) > 0:
|
||||||
if app['builds'][-1]['subdir']:
|
|
||||||
root_dir = os.path.join(build_dir, app['builds'][-1]['subdir'])
|
|
||||||
if app['builds'][-1]['gradle']:
|
if app['builds'][-1]['gradle']:
|
||||||
flavours = app['builds'][-1]['gradle']
|
flavours = app['builds'][-1]['gradle']
|
||||||
|
|
||||||
if not os.path.isdir(root_dir):
|
hpak = None
|
||||||
return (None, "Subdir '" + app['builds'][-1]['subdir'] + "'is not a valid directory")
|
hver = None
|
||||||
|
hcode = "0"
|
||||||
|
for subdir in possible_subdirs(app):
|
||||||
|
root_dir = os.path.join(build_dir, subdir)
|
||||||
paths = common.manifest_paths(root_dir, flavours)
|
paths = common.manifest_paths(root_dir, flavours)
|
||||||
|
|
||||||
version, vercode, package = \
|
version, vercode, package = \
|
||||||
common.parse_androidmanifests(paths, app['Update Check Ignore'])
|
common.parse_androidmanifests(paths, app['Update Check Ignore'])
|
||||||
if not package:
|
if app_matches_packagename(app, package) and version and vercode:
|
||||||
|
logging.debug("Manifest exists in subdir '{0}'. Found version {1} ({2})"
|
||||||
|
.format(subdir, version, vercode))
|
||||||
|
if int(vercode) > int(hcode):
|
||||||
|
hpak = package
|
||||||
|
hcode = str(int(vercode))
|
||||||
|
hver = version
|
||||||
|
|
||||||
|
if not hpak:
|
||||||
return (None, "Couldn't find package ID")
|
return (None, "Couldn't find package ID")
|
||||||
if not app_matches_packagename(app, package):
|
if hver:
|
||||||
return (None, "Package ID mismatch - got {0}".format(package))
|
return (hver, hcode)
|
||||||
if not version:
|
return (None, "Couldn't find any version information")
|
||||||
return (None, "Couldn't find latest version name")
|
|
||||||
if not vercode:
|
|
||||||
if "Ignore" == version:
|
|
||||||
return (None, "Latest version is ignored")
|
|
||||||
return (None, "Couldn't find latest version code")
|
|
||||||
|
|
||||||
vercode = str(int(vercode))
|
|
||||||
|
|
||||||
logging.debug("Manifest exists. Found version {0} ({1})".format(version, vercode))
|
|
||||||
|
|
||||||
return (version, vercode)
|
|
||||||
|
|
||||||
except VCSException as vcse:
|
except VCSException as vcse:
|
||||||
msg = "VCS error while scanning app {0}: {1}".format(app['id'], vcse)
|
msg = "VCS error while scanning app {0}: {1}".format(app['id'], vcse)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue