mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
Merge branch 'install-fixes' into 'master'
install: fix breakage in downloading from Maven Central, GitHub Releases See merge request fdroid/fdroidserver!1572
This commit is contained in:
commit
e52a07d63a
2 changed files with 7 additions and 6 deletions
|
@ -2976,7 +2976,7 @@ def FDroidPopenBytes(commands, cwd=None, envs=None, output=True, stderr_to_stdou
|
|||
while not stdout_reader.eof():
|
||||
while not stdout_queue.empty():
|
||||
line = stdout_queue.get()
|
||||
if output and options.verbose:
|
||||
if output and options and options.verbose:
|
||||
# Output directly to console
|
||||
sys.stderr.buffer.write(line)
|
||||
sys.stderr.flush()
|
||||
|
|
|
@ -80,7 +80,6 @@ def download_apk(appid='org.fdroid.fdroid', privacy_mode=False):
|
|||
# prefer APK in default release channel
|
||||
preferred_version = version
|
||||
break
|
||||
print('skipping', version)
|
||||
|
||||
mirrors = common.append_filename_to_mirrors(
|
||||
preferred_version['file']['name'][1:], common.FDROIDORG_MIRRORS
|
||||
|
@ -116,7 +115,8 @@ def download_fdroid_apk_from_github(privacy_mode=False):
|
|||
token = None
|
||||
gh = github.GithubApi(token, 'https://github.com/f-droid/fdroidclient')
|
||||
latest_apk = gh.get_latest_apk()
|
||||
return net.download_file(latest_apk)
|
||||
filename = os.path.basename(latest_apk)
|
||||
return net.download_file(latest_apk, os.path.join(common.get_cachedir(), filename))
|
||||
|
||||
|
||||
def download_fdroid_apk_from_ipns(privacy_mode=False):
|
||||
|
@ -137,10 +137,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue