From michal.vasut at gmail.com Tue Feb 25 18:38:51 2025 From: michal.vasut at gmail.com (=?UTF-8?Q?Michal_Va=C5=A1ut?=) Date: Tue, 25 Feb 2025 19:38:51 +0100 Subject: Correct usage of "appstreamcli validate-tree" Message-ID: 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 data/org.file.krita/org.file.krita.metainfo.xml it detects file and correctly returns I: org.file.krita:26: nonstandard-gnome-extension metadata ? Validation was successful: infos: 1 ----- but when I do appstreamcli validate-tree data/org.file.krita or appstreamcli validate-tree data (even if I add slash (/) at the end), it always returns I: ~:~: dir-no-metadata-found What am I doing wrong? Thanks. Michal PS: the metafile content (just testing, not real data) is org.file.krita org.gimp.GIMP Krita File Loader Load .kra project files (Preview)

This extension loads the preview image from a .kra project file. This allows you to import and edit a merged image from Krita. Future versions of this extension will import more features.

https://gimp.org Random Guy CC0-1.0 GPL-3.0+ org.gimp.GIMP file-krita.py The FooBar main window. https://www.gimp.org/images/frontpage/wilber-big.png
-------------- next part -------------- An HTML attachment was scrubbed... URL: From kloecker at kde.org Tue Feb 25 20:22:43 2025 From: kloecker at kde.org (Ingo =?UTF-8?B?S2zDtmNrZXI=?=) Date: Tue, 25 Feb 2025 21:22:43 +0100 Subject: Correct usage of "appstreamcli validate-tree" In-Reply-To: References: Message-ID: <5714688.ZASKD2KPVS@daneel> 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 -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part. URL: From michal.vasut at gmail.com Tue Feb 25 20:34:54 2025 From: michal.vasut at gmail.com (=?UTF-8?Q?Michal_Va=C5=A1ut?=) Date: Tue, 25 Feb 2025 21:34:54 +0100 Subject: Correct usage of "appstreamcli validate-tree" In-Reply-To: <5714688.ZASKD2KPVS@daneel> References: <5714688.ZASKD2KPVS@daneel> Message-ID: 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 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: