mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
install: fix broken URL building logic for Maven Central
The append logic was wrong, so it was trying to download URLs like: https://repo.maven.apache.org/maven2/org/fdroid/fdroid/F-Droid/maven-metadata.xml/org/fdroid/fdroid/F-Droid/1.20.0/F-Droid-1.20.0.apk Which should be: https://repo.maven.apache.org/maven2/org/fdroid/fdroid/F-Droid/1.20.0/F-Droid-1.20.0.apk Can be manually tested using: `test_download_fdroid_apk=1 python -m unittest -k test_download_fdroid_apk_from_maven`
This commit is contained in:
parent
a2d27ba15e
commit
d2cc020336
1 changed files with 4 additions and 3 deletions
|
|
@ -136,10 +136,11 @@ def download_fdroid_apk_from_maven(privacy_mode=False):
|
|||
mirrors = MAVEN_CENTRAL_MIRRORS[:2] # skip the Google servers
|
||||
else:
|
||||
mirrors = MAVEN_CENTRAL_MIRRORS
|
||||
mirrors = common.append_filename_to_mirrors(
|
||||
metadata = net.download_using_mirrors(
|
||||
common.append_filename_to_mirrors(
|
||||
os.path.join(path, 'maven-metadata.xml'), mirrors
|
||||
)
|
||||
metadata = net.download_using_mirrors(mirrors)
|
||||
)
|
||||
version = XMLElementTree.parse(metadata).getroot().findall('*.//latest')[0].text
|
||||
mirrors = common.append_filename_to_mirrors(
|
||||
os.path.join(path, version, f'F-Droid-{version}.apk'), mirrors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue