"requires" tag not working?
#1
Hi all,

Going through the XBMC Addon Developers Guide (Appendix C) I stumbled on something weird.

In the addons.xml I require the RSS Editor to be installed:

Code:
<addon id="script.rss-chippyash" version="0.0.1" name="A better RSS Reader?" provider-name="Ashley Kitson">
    <extension point="xbmc.python.pluginsource" library="rss_example.py">
        <provides>audio</provides>
        <requires>
            <import addon="script.rss.editor" version="1.5.9"/>
        </requires>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>A better RSS reader?</summary>
        <description>Example dynamic listing program for the Addon Developers Guide.</description>
        <platform>all</platform>
    </extension>
</addon>

However, I commited a booboo and forgot to install that addon. The script should have given me a useful response such as "script.rss-editor not found", or even seeemlessly auto installed it. Instead it just fails at the python import.

Indeed, if I change that requires line to something silly:

Code:
<requires>
    <import addon="script.moononastick" version="1.2.7" optional="false"/>
</requires>

It still has no effect. Neither does moving the <requires> tag outside the scope of the extension tag.

Two failures:
  • XBMC failed to resolve and auto install script.rss.editor
  • XBMC failed to prevent the launch because requirements were not met.

As an aside, I've noticed that changes to addon.xml only come into effect on startup. Ie changing addon.xml with new values while XBMC is running has no effect.

Tested in both Ubuntu repo (Eden) and Team XBMC PPA (Frodo).

Where am I going wrong?
Reply
#2
Afaik the require-tag is only respected/resolved if the add-on is installed through a repository (and not manually via .zip).
My GitHub. My Add-ons:
Image
Reply
#3
(2013-03-22, 15:23)sphere Wrote: Afaik the require-tag is only respected/resolved if the add-on is installed through a repository (and not manually via .zip).

it should also when installing through .zip

However if you are changing your addon.xml while developing the requires is not checked again for installing dependency so it's only done at the install fase and not afterwards

Changing info in the addon.xml is only read at reboot
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
It's also not checked if you are copying/pasting the files into the add-ons directory fyi
Reply
#5
Ah I see, that makes sense, thanks guys! Maybe the documentation should be updated to make this clear?
Reply

Logout Mark Read Team Forum Stats Members Help
"requires" tag not working?0