[AppStream] Adding <filename> to <artifact>?

Matthias Klumpp matthias at tenstral.net
Thu Jan 28 20:10:43 UTC 2021


Am Do., 28. Jan. 2021 um 18:41 Uhr schrieb Richard Hughes <hughsient at gmail.com>:
>
> On Thu, 28 Jan 2021 at 17:08, Matthias Klumpp <matthias at tenstral.net> wrote:
> > (It's not like I didn't think of maybe naming this tag "basename", to
> > distinguish it from filenames-with-paths, but tbh I think "filename"
> > here is just as expressive and possibly makes the intent clearer for
> > someone who casually reads the XML).
>
> I also pondered <basename> -- if you'd rather that it's no problem to change.

So, I learned a few months ago that for a path like /a/b/myfile.dat,
the "basename" for anything that is using GLib is "myfile.dat", but
for anything that is using Qt, the basename is "myfile". The thing
that GLib calls "basename", Qt calls "filename" with the full path
being "filepath".
In the concept of AppStream, there is no precedent for any such naming
- full paths exist, but they aren't explicitly labeled.
Therefore, I think using "filename" is the most intuitive and in that
particular context a pretty unambiguous name (while "basename" would
definitely raise the question "base of what?" for some people).

So, unless you have objections:
https://github.com/ximion/appstream/commit/94f9db5c6ee9dd38699ef4d7cd20528503ac357a

> > There's something else in your XML though that is also nonstandard:
> > AppStream currently has no support for the "Interplanetary File
> > System" URLs, so if you were going to validate that, appstreamcli
> > would very much complain.
> > So, should I permit the ipfs:// scheme for AppStream as well? ;-)
>
> Ohh, I've done it again :) Yes please, ipfs:// and ipns:// too

Do you think the IPFS stuff is here to stay? Also, do you think it
would be used for screenshot hosting for AppStream and other purposes
as well?
I could make the validator not complain about IPFS URLs, but wait a
bit with adding this to the specification, so we know whether this is
a permanent thing and whether software centers should add support for
it (and more importantly, things like appstream-generator would need
support for it...)

Cheers,
    Matthias

-- 
I welcome VSRE emails. See http://vsre.info/


More information about the AppStream mailing list