[AppStream] Requiring a specific version of something
Richard Hughes
hughsient at gmail.com
Tue Dec 20 14:39:38 UTC 2016
On 20 December 2016 at 14:25, Matthias Klumpp <matthias at tenstral.net> wrote:
> Flatpak too? That would mean I was right the whole time with my more
> modular approach to bundling, yay ^^ - why doesn't it feel better? :P
Well, flatpak apps can depend on an SDK or Runtime (or both) but not each other.
> But a firmware can be for many devices, shouldn't we define which
> firmware the version comparison should act on? Or does "firmware" mean
> "the current installed firmware"?
Exactly that, for cases where you can upgrade 1.x.x to 1.y.y but not to 2.x.x.
> Crazy. I never thought this would be that complex. I think I just need
> to blindly trust you on that ^^
So you'd think people would just use DFU. Apparently not :)
https://blogs.gnome.org/hughsie/2015/11/14/fwupd-and-dfu/
> AppStream/libas is a bit more advanced in that regard:
> https://github.com/ximion/appstream/blob/master/src/as-utils.c#L933
> (based on what RPM has) - but I always wanted to edit the algorithm
> slightly to be less surprising for both DPKG and RPM users.
I tried to avoid being magic by taking the "least common denominator"
approach. I'm open for ideas.
> Will have have a dependency solver in AppStream at some point? I kind
> of hope that this won't happen...
I hope not.
> Or
> <requires>
> <firmware version="1.1" compare="lower-equal"/>
> </requires>
This would match the provides style with a few tweaks:
<provides>
<firmware type="flashed">84f40464-9272-4ef7-9399-cd95f12da696</firmware>
</provides>
akin to:
<requires>
<firmware type="bootloader" compare="lower-equal" version="1.1"/>
<id type="component">org.foo.Bar</id>
</requires>
or even:
<requires>
<firmware type="bootloader" compare="version-equal-or-lower">1.1</firmware>
<id>org.foo.Bar</id>
</requires>
Richard
More information about the AppStream
mailing list