<p dir="ltr">Aha, now it makes sense now.</p>
<p dir="ltr">Basically what I'm trying to do is some kind of validation for uploaded addons.  (it'll upload archive to server, unpack it to some temp folder and checks content). It'll have app specific validation, but I hoped I could use existing tooling (appstreamcli) as much as possible.<br>
"appstreamcli validate-tree" should be able to validate metafile, but also screenshots, icons and other things mentioned there. But as you said, that's not possible.</p>
<p dir="ltr">Okay, I'll use "appstreamcli validate" and check the rest manually.</p>
<p dir="ltr">Or is there better way? </p>
<br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Feb 25, 2025, 21:23 Ingo Klöcker <<a href="mailto:kloecker@kde.org">kloecker@kde.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Dienstag, 25. Februar 2025 19:38:51 Mitteleuropäische Normalzeit Michal <br>
Vašut wrote:<br>
> Hello, I have file structure like this<br>
> <br>
> tree data/org.file.krita/<br>
> data/org.file.krita/<br>
> ├── file-krita.py<br>
> └── org.file.krita.metainfo.xml<br>
> <br>
> when I do<br>
> <br>
> appstreamcli validate-tree data/org.file.krita<br>
> <br>
> (even if I add slash (/) at the end), it always returns<br>
> <br>
> I: ~:~: dir-no-metadata-found<br>
> <br>
> What am I doing wrong?<br>
<br>
You are doing nothing wrong (except that you trying to use a tool for a task <br>
that it's not meant to be used for). I think the documentation is giving wrong <br>
expectations:<br>
       validate-tree DIRECTORY<br>
           Validate AppStream XML metadata found in a file-tree.<br>
<br>
Using strace I see that `appstreamcli validate-tree data/org.file.krita` looks <br>
at the following two folders (which don't exist) and at nothing else:<br>
data/org.file.krita/usr/share/metainfo<br>
data/org.file.krita/share/metainfo<br>
<br>
It seems that validate-tree is meant to be used on installed AppStream XML <br>
metadata, e.g. the file tree prepared for an AppImage as .../AppDir/usr/share/<br>
metainfo, but not on arbitrary folder hierarchies containing AppStream files.<br>
<br>
Regards,<br>
Ingo</blockquote></div>