[AppStream] Requiring a specific version of something
Richard Hughes
hughsient at gmail.com
Tue Dec 20 14:05:15 UTC 2016
On 20 December 2016 at 13:14, Matthias Klumpp <matthias at tenstral.net> wrote:
> Dependency logic, the thing we wanted to avoid in AppStream ;-)
Right; but every system seems to get pulled into this for practical
reasons, e.g. snappy and flatpak also.
> For bootloaders and firmware: What exactly is the version you require,
> i.e. *which* bootloader and *which* firmware should the version
> relation apply to?
Usually these are specific the hardware; sometimes they're actually
the same image and just booted with a different set of USB
descriptors. There's not a generalized definition IMHO.
> And what is a "validation" exactly?
Ohh, just an example. Some devices have a few different "slots" where
the slots have to be populated and updated in different ways.
Validation would just be a combination of images for signing for
example.
> In any case, we also need to use the same version-comparison algorithm
> - I just recently had funny results because someone mixed different
> algorithms comparing versions differently (I would suggest using the
> RPM version-compare algorithm, which is pretty good - maybe make it
> handle "~" chars better).
I've got a naive as_utils_vercmp() in appstream-glib; I don't think
that supports anything other than [<numeric>.]
> I need to let this sink in and think about this a bit more (I don't
> want to have fiormware take a very generic name and then make it have
> a very specific meaning, we e.g. already have this with the
> <location/> tag which is pretty much used exclusively by firmware).
What about another more generic proposal:
<requires type="application">
<id>org.freedesktop.appstream.cli</id>
<version>2.0</version>
</requires>
(although I'm not sure we want to support this, it gives us some
headroom if we ever do)
<requires type="firmware">
<id>bootloader</id>
<version compare="equal-or-greater">1.0</version>
</requires>
Also, omitting the compare attribute must mean "exactly the same string", right?
Richard.
More information about the AppStream
mailing list