Bug Very weird bug with addon auto-updating from a custom repo
#1
I've run into a weird bug when trying to create a custom repo for some of my addon.

The story is the following:
I've developed a couple of addons for Ukrainian users and, having tired from publishing updates manually, I've decided to create a custom repo to organize automatic updates. The repo is based on my Dropbox Public folder. Since it's only a couple of addons, Ive decided not to create a separate repository addon but to place repository info into addon.xml files of my addons.
I've read the following articles:
http://kodi.wiki/view/Add-on_repositories
http://kodi.wiki/view/HOW-TO:Create_a_Re...or_add-ons
placed my files into appropriate folders and created addons.xml and addons.xml.md5 files using the provided Python script. Then placed the follwing strings into addon.xml file of my first addon (plugin.video.ex.ua.alternative):
Code:
<extension point="xbmc.addon.repository" name="romanvm repository">
  <info compressed="false">https://dl.dropboxusercontent.com/u/24356082/kodi_repo/addons.xml</info>
  <checksum>https://dl.dropboxusercontent.com/u/24356082/kodi_repo/addons.xml.md5</checksum>
  <datadir zip="true">https://dl.dropboxusercontent.com/u/24356082/kodi_repo</datadir>
</extension>
Then I've run a test: set a lower version in the installed addon and then started Kodi. Everything went smoothly: Kodi downloaded the update, replaced the existing addon and showed a pop-up message that the addon had been updated.
Here is the log with successful update: http://xbmclogs.com/show.php?id=359721

Then I've added a second addon into my repo, re-generated repo metadata and added the above strings into addon.xml file of my second addon. And then strange things began. Kodi showed pop-up messages about successful updates for both addons but in fact the addons weren't updated. After having analyzed a debug log I saw that, instead of updating both addons, Kodi launched one of the addons silently with different paramstrings:
Code:
20:40:37 T:4588   DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin CNET Video Podcasts('plugin://plugin.video.cnet/','1','?action=install&package=plugin.video.cnet&version=0.0.2')
...
20:40:37 T:4524   DEBUG: XFILE::CPluginDirectory::StartScript - calling plugin CNET Video Podcasts('plugin://plugin.video.cnet/','2','?action=install&package=plugin.video.ex.ua.alternative&version=2.1.4')
(plugin.video.cnet is the plugin that I wrote on my own as my learning project when I studied XBMC addon development. It has nothing to do with the other Cnet plugin from the official repo.)
Full debug log: http://xbmclogs.com/show.php?id=359728
I've experimented a bit and found out that the addon is indeed launched silently and the results depend on how the paramstring is processed. If an addon can ignore this invalid paramstring, then nothing happens, and Kodi shows a pop-up about a successful update (without actual update). But if the addon cannot process this paramstring for some reason, then a Python exception is thrown depending on how this invalid paramstring screwed up with addon code.

After having removed the second addon both from my repo and Kodi, the first addon was auto-updated successfuly again.

But the worst thing was that though I've removed the second addon from the repo, regenerated the repo metadata, removed the repo info from addon.xml of the second addon, and then re-installed this second addon, the auto-update was disrupted again. I've tried to re-scan repositories manually, but with no success: my first addon cannot be auto-updated any more while the second addon is present, even if this second addon is not in the repo and has no info about the repo in its addon.xml.

I was able to reproduce this bug on my other system with XBMC 13.2 and different set of addons (actually, the 1st addon was the same, but the second was different), so the but does not depend on Kodi/XBMC version.

I hope this detailed explanation will help to understand what has gone wrong.
Reply
#2
heh. funky.

somehow it thinks that plugin is actually the installation script for the repository. a repository can ship a .py file to handle installation if it wants to (intended to be used for binary addons - installation on linux through pkgkit or the likes). how you ended up in this mess is a complete mystery to me though, but that is definitely what is going on.
Reply
#3
Oh.. it's 2015 and I am having exactly the same problem as thread owner!
Did you find out the solution Roman?
Reply
#4
Yes, I've removed repo metadata from all my addons and created a separate repo addon.
Reply

Logout Mark Read Team Forum Stats Members Help
Very weird bug with addon auto-updating from a custom repo0