WIP: Mirror support
Addresses #35
Merge request reports
Activity
mentioned in issue #35
changed milestone to %1.0
added bazaar label
- Resolved by username-removed-1345
- Resolved by username-removed-1345
Now has mirror support for the index.
https://gitlab.com/cde/fdroidclient/commit/d3651f8c5b0aad251054bc27fc46f713ad1435fe contains the bulk of the changes, and I've tried not to re-invent things by simply re-using both the previous index download code, as well as the
getMirror()
function fromInstallManagerService
TODOS / Notes:
- Make more functions as needed
- Find a good, generic place for
getMirror()
currently present in bothInstallManagerService
andIndexV1Updater
, alongwith supporting variables - Unsure about the while loop I added in
IndexV1Updater
to deal with the mirror. Any better alternate suggestions? My basic instinct was to not touch the current download code at all, so it doesn't affect any existing installs where the downloads already work.
I moved the
getMirror()
code to FDroidApp.java, that function is what keeps track of the lastWorkingMirror, and also retry / timeout logic. However, while the code is shared, both the index download part and the app download part reset those variables before download for now, to avoid added complexity, and to avoid changing the current download code.I.e., all of this new mirror code is used only after we get
ConnectException | SocketTimeoutException
while downloading from the default address. This holds true for both index and app download.changed milestone to %1.1