Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repository.xbmc.org] Use dir in extension point #21029

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Feb 23, 2022

Description

It was brought to my attention by @Lunatixz that our addon-checker was failing to validate valid addon.xml definitions for repository addons. That made me look into the implementation in the Kodi core and find out we currently (and since at least gotham) we support two ways of defining a repo structure, with and without dirs:

<extension point="xbmc.addon.repository">
  <dir>
    <info>https://example.com/addons/addons.xml</info>
    <checksum>https://example.com/addons/addons.xml.md5</checksum>
    <datadir>https://example.com/addons/</datadir>
    <hashes>sha256</hashes>
  </dir>
</extension>

and the ancient way (dharma compatible?):

<extension point="xbmc.addon.repository">
    <info>https://example.com/addons/addons.xml</info>
    <checksum>https://example.com/addons/addons.xml.md5</checksum>
    <datadir>https://example.com/addons/</datadir>
  </extension>

The wiki was also lacking most of this info, so added in https://kodi.wiki/view/Add-on_repositories

I've made the necessary changes in xbmc/addon-check#256 but it's not fail-proof. With xsd 1.0 we can't make sure that if a dir does not exist the other elements (info/checksum, etc) must exist. Might be possible with xs:assert in higher xsd versions but that requires deep changes in addon checker.
Thinking a bit more about this, I don't think there's a reason to continue supporting the "dharma" way if the option with dirs is more recent and more flexible (it supports min and max versions for example).
So I plan to remove the ancient support in Kodi. As far as I could see, all the mainstream external repos use dir anyway. I am not sure about dodgy/illegal addon repos but I/we don't care for them anyway. Unfortunately our official addon repo is still stuck with the older schema :)

That's all this PR does, it updates the repo to use the up to date schema for repos.
Will remove the support for the older definition type in a follow up PR.

How has this been tested?

Runtime tested

What is the effect on users?

None

@enen92 enen92 added Type: Improvement non-breaking change which improves existing functionality Component: Add-ons v20 Nexus labels Feb 23, 2022
@enen92 enen92 added this to the Nexus 20.0 Alpha 1 milestone Feb 23, 2022
@Lunatixz Lunatixz merged commit 6ffd8cc into xbmc:master Feb 23, 2022
@enen92
Copy link
Member Author

enen92 commented Feb 23, 2022

@Lunatixz thanks for the quick merge but we require at least one approval before merging core PRs. Please approve it next time or at least give it a few time in the queue for higher visibility. I asked the review of multiple people for a reason :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Add-ons Type: Improvement non-breaking change which improves existing functionality v20 Nexus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants