I encountered the following problematic scenario, and would like to make a suggestion for a solution:
- Upgrade CE to version 9.0.1
- Make sure that directory /storage/.kodi/addons/repository.coreelec doesn’t exist and directory /storage/.kodi/addons/packages is empty
- Make sure that coreelect repository addon is up to date (version 9.0.2)
- Try to update some of the addons - for example, pvr.iptvarchive, which in 9.0.1 was updated to 18.104.22.168
Result: even though an update to the plugin is detected by CE, when I try to update the addon manually I get the following error message in the log, and the update fails:
2019-03-07 13:37:49.696 T:3928982384 ERROR: Requested path https://addons.coreelec.org/9.0/Amlogic/arm/pvr.iptvarchive/pvr.iptvarchive-22.214.171.124.zip not found in known repository directories
2019-03-07 13:37:49.696 T:3928982384 ERROR: AddonInstallJob[pvr.iptvarchive]: failed to resolve addon install source path
Looking at coreelec configuration I saw that the path to the download location was correct:
# grep addons.coreelec.org /usr/share/kodi/addons/repository.coreelec/addon.xml <info>https://addons.coreelec.org/9.0.1/Amlogic/arm/addons.xml.gz</info> <checksum verify="sha256">https://addons.coreelec.org/9.0.1/Amlogic/arm/addons.xml.gz?sha256</checksum> <datadir zip="true">https://addons.coreelec.org/9.0.1/Amlogic/arm</datadir>
Eventually, I traced the problem to a file /storage/.kodi/userdata/Database/Addons27.db: a ‘path’ attribute in a ‘metadata’ column of a table ‘addons’ contained wrong address (with ‘9.0’ in the path instead of ‘9.0.1’). After I manually removed the file (and then it was automatically rebuilt properly), the update began to work.
It seems upon update CE should remove/rebuild this database automatically.