[AppStream] Adding <filename> to <artifact>?
Matthias Klumpp
matthias at tenstral.net
Thu Jan 28 17:08:20 UTC 2021
Am Do., 28. Jan. 2021 um 17:00 Uhr schrieb Richard Hughes <hughsient at gmail.com>:
>
> On Thu, 28 Jan 2021 at 15:55, Matthias Klumpp <matthias at tenstral.net> wrote:
> > Two questions: Why do you need a filename at all for a cache? Wouldn't
> > just using any of the checksums be enough?
>
> I guess just user experience; I'm guessing users would feel more
> comfortable doing:
>
> fwupdmgr install hughski-colorhug2-1.2.5.cab
>
> rather than
>
> fwupdmg install QmfHhw3LewHVFi13f839yXWsBG8UHu1AaAvWQcSAVjHUXn
Ah, I didn't know you could install stuff by filename rather than by
using the component-ID there, as in
fwupdmgr install com.hughski.ColorHug >= 1.2.5
In any case though, I think having the filename doesn't hurt in case
the URL is exceptionally weird, just for user convenience and apps
which use the AppStream metadata to download applications.
> > And second: Why does the filename contain something like a hash
> > already? Shouldn't it be
> > <filename>hughski-colorhug2-1.2.5.cab</filename> with any "make it
> > unique" hashes appended by the caching code on the client side, rather
> > than trusting a value in the metainfo file?
>
> Hmm, that's an artifact of the LVFS -- I guess we should remove the
> hash in the filename.
>
> > Hehe ^^ - I think adding <filename/> is reasonable
>
> So, should I start using <filename> already? :)
While I should reply "No", as that stuff isn't specified yet and using
unspecified things is bad just in case we might change something for
some reason before it's actually released, I don't think using this
early is particularly risky. ;-)
(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).
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? ;-)
Cheers,
Matthias
--
I welcome VSRE emails. See http://vsre.info/
More information about the AppStream
mailing list