Archive repo specifies app icon from latest version in main repo
When viewing apps from an Archive repo (e.g. F-Droid Archive or Guardian Project Archive) then many icons will fail to load in F-Droid client.
To reproduce, disable all repos except for F-Droid Archive, then close and reopen F-Droid and notice how almost all icons (if not all) fail to load. This is due to 404'ing on the server when requesting icons.
This was investigated in fdroidclient#1142 (closed), with the following outcome:
- The index includes an "icon" entry for each app.
- The icon refers to a specific version of the icon in the archive repo (e.g. /archive/icons-480/package.versionCode.png)
- The version code it uses is actually the latest version code from the main, non-archive repo.
Here is some analysis from the "Call Recorder" app which was the latest published app at time of investigating:
With just the archive repo enabled, icons are not shown for any apps. If I inspect which URL is being requested, I can see that for "Call Recorder" it tries to load https://f-droid.org/archive/icons-480/com.github.axet.callrecorder.93.png which 404s. Note however that replacing "/archive/" with "/repo/" correctly loads an icon: https://f-droid.org/repo/icons-480/com.github.axet.callrecorder.93.png. I'm thinking this is a bug in fdroidserver because:
- versionCode 93 is only available in the main repo
- The lateset version in the archive is 88.
- The icon for 88 is indeed in the Archive webroot as expected:
- The icon for 93 is of course not going to be in the archive because it is only in the main repo:
Despite this, the metadata for the archive shows the following:
{
"packageName" : "com.github.axet.callrecorder",
"icon" : "com.github.axet.callrecorder.93.png",
...