mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-05-10 16:58:03 -04: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:
@@ -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(
|
||||
os.path.join(path, 'maven-metadata.xml'), 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
|
||||
|
||||
Reference in New Issue
Block a user