[AppStream] Adding <filename> to <artifact>?
Matthias Klumpp
matthias at tenstral.net
Thu Jan 28 15:54:56 UTC 2021
Hi! :-)
Am Do., 28. Jan. 2021 um 15:27 Uhr schrieb Richard Hughes <hughsient at gmail.com>:
>
> Hi all,
>
> I've just switched the LVFS from the nonstandard:
>
> <release version="1.2.5">
> <location>ipfs://QmfHhw3LewHVFi13f839yXWsBG8UHu1AaAvWQcSAVjHUXn</location>
> <checksum type="sha1"
> filename="9a4e77009da7d3b5f15a1388afeb9e5d41a5a8ae-hughski-colorhug2-1.2.5.cab"
> target="container">3831532bc94e6385807372a5485a8cbf6b024eeb</checksum>
> <checksum type="sha256"
> filename="9a4e77009da7d3b5f15a1388afeb9e5d41a5a8ae-hughski-colorhug2-1.2.5.cab"
> target="container">23d4d2c24876d2060ac4d654032d38074ff7af6eaa505f4e62a760b6fb406614</checksum>
> <url type="source">https://github.com/hughski/colorhug2-firmware</url>
> <size type="installed">16384</size>
> <size type="download">10673</size>
> </release>
>
> to the more standard:
>
> <releases>
> <release version="1.2.5">
> <artifacts>
> <artifact>
> <location>ipfs://QmfHhw3LewHVFi13f839yXWsBG8UHu1AaAvWQcSAVjHUXn</location>
> <checksum
> type="sha1">3831532bc94e6385807372a5485a8cbf6b024eeb</checksum>
> <checksum
> type="sha256">23d4d2c24876d2060ac4d654032d38074ff7af6eaa505f4e62a760b6fb406614</checksum>
> <size type="installed">16384</size>
> <size type="download">10673</size>
> </artifact>
> </artifacts>
> </release>
This is great! That actually openes the door to removing the
deprecated stuff at some point :-)
> This is pretty complete; although missing one bit of data. When we use
> the <location> with <artifact> we don't actually now know the filename
> to use for the download or disk cache -- which I snuck into the
> <checksum> before. What about something like
> <filename>9a4e77009da7d3b5f15a1388afeb9e5d41a5a8ae-hughski-colorhug2-1.2.5.cab</filename>
> as a child of the <artifact> element?
Two questions: Why do you need a filename at all for a cache? Wouldn't
just using any of the checksums be enough?
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?
> I didn't want to do anything nonstandard, given all this migration
> pain is because I did this nonstandard thing all those years ago :)
Hehe ^^ - I think adding <filename/> is reasonable, and we could maybe
even get that into the next release already. I just want to understand
how it would be used a bit better.
Cheers!
Matthias
--
I welcome VSRE emails. See http://vsre.info/
More information about the AppStream
mailing list