ximion / appstream-generator

A fast AppStream metadata generator
GNU Lesser General Public License v3.0
44 stars 29 forks source link

Please help understanding what's wrong with this log #98

Closed basilgello closed 3 years ago

basilgello commented 3 years ago

We have added metainfo file to Kodi: https://github.com/xbmc/xbmc/pull/20142 but appstream-generator still complaints no-metainfo: https://appstream.debian.org/sid/main/issues/kodi.html Also, I don't see what causes ancient-metadata warning.

The prebuilt Kodi package is here: https://packages.debian.org/sid/amd64/kodi/download

And big thanks from Kodi team in advance! :)

ximion commented 3 years ago

The ancient-metadata error is indeed very strange, that makes no sense to me and looks like a false-positive (I am looking into that issue). The metadata is indeed invalid though:

$ appstreamcli validate kodi.metainfo.xml
E: ~:~: xml-markup-invalid
     Could not parse XML data: Entity: line 109: parser error : Premature end of data in tag
     component line 2

     ^
Validation failed: errors: 1

=> You are missing the closing </component> tag in the document ;-)

Then you only need to make the component-ID an rDNS string, for example tv.kodi.kodi, and then validation will pass :-) Sorry for the weird error message, I guess there's an issue in out-of-context libxml2 error handling which yields the (wrong) ancient metadata message instead of the correct "broken XML" message.

basilgello commented 3 years ago

@ximion Great! Thanks for the hint! :)

@razzeee can you please fix your original MR? :)

basilgello commented 3 years ago

@ximion Is it normal that appstreamcli validate kodi.metainfo.xml hangs indefinitely trying to reach some HTTP resource?

strace.log

ximion commented 3 years ago

It will time out eventually, but it will try to reach all URLs in the metadata file and complain if any of them is unreachable or yields bad data. You can disable all networking stuff by passing --no-net to appstreamcli: appstreamcli validate --no-net kodi.metainfo.xml

razzeee commented 3 years ago

We do have a closing tag https://github.com/xbmc/xbmc/pull/20142/files#diff-dff09a15188912bf2b3091bfdd844f5d45e0da078ebb41a71de0b1c9ee994b2cR109

Did it get lost somewhere in between? Did you copy the file by hand?

basilgello commented 3 years ago

Did it get lost somewhere in between? Did you copy the file by hand?

Yes, that was quilt bug on Debian side somehow :)