Correct usage of "appstreamcli validate-tree"

Michal Vašut michal.vasut at gmail.com
Tue Feb 25 20:34:54 UTC 2025


Aha, now it makes sense now.

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.
"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.

Okay, I'll use "appstreamcli validate" and check the rest manually.

Or is there better way?

On Tue, Feb 25, 2025, 21:23 Ingo Klöcker <kloecker at kde.org> wrote:

> On Dienstag, 25. Februar 2025 19:38:51 Mitteleuropäische Normalzeit Michal
> Vašut wrote:
> > Hello, I have file structure like this
> >
> > tree data/org.file.krita/
> > data/org.file.krita/
> > ├── file-krita.py
> > └── org.file.krita.metainfo.xml
> >
> > when I do
> >
> > appstreamcli validate-tree data/org.file.krita
> >
> > (even if I add slash (/) at the end), it always returns
> >
> > I: ~:~: dir-no-metadata-found
> >
> > What am I doing wrong?
>
> You are doing nothing wrong (except that you trying to use a tool for a
> task
> that it's not meant to be used for). I think the documentation is giving
> wrong
> expectations:
>        validate-tree DIRECTORY
>            Validate AppStream XML metadata found in a file-tree.
>
> Using strace I see that `appstreamcli validate-tree data/org.file.krita`
> looks
> at the following two folders (which don't exist) and at nothing else:
> data/org.file.krita/usr/share/metainfo
> data/org.file.krita/share/metainfo
>
> It seems that validate-tree is meant to be used on installed AppStream XML
> metadata, e.g. the file tree prepared for an AppImage as
> .../AppDir/usr/share/
> metainfo, but not on arbitrary folder hierarchies containing AppStream
> files.
>
> Regards,
> Ingo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/appstream/attachments/20250225/e1716aae/attachment.htm>


More information about the AppStream mailing list