[AppStream] Requiring a specific version of something

Matthias Klumpp matthias at tenstral.net
Tue Dec 20 13:14:04 UTC 2016


2016-12-20 12:08 GMT+01:00 Richard Hughes <hughsient at gmail.com>:
> [...]
>
> Lets concentrate on this for now. I'm not sure putting the bootloader
> name in the tag; there can actually be multiple layers of firmware (up
> to 4!) each with slightly different semantics and names for each
> device.
>
> What about:
>
> <require_version id="bootloader" compare="version-least">0.1.0</require_version>
> <require_version id="firmware" compare="version-most">0.5.1</require_version>
> <require_version id="validation" compare="exact">17</require_version>

Dependency logic, the thing we wanted to avoid in AppStream ;-)
ID in an AppStream context usually means component-id, so using type
is likely better... That way, if we ever introduce dependencies on
other software components, we could use that.
If we want to make it that generic, the result would probably be:
<requires type="bootloader" compare="bigger-equal" version="0.1.0"/>
<requires compare="bigger"
version="2.0">org.freedesktop.appstream.cli</requires>
<requires type="firmware" compare="lower"
version="0.5.1">org.example.myfirmware</requires>

Which allows depending on pretty much anything, which using
<requires/> which matches the existing tags <suggests/> and
<provides/>.

For bootloaders and firmware: What exactly is the version you require,
i.e. *which* bootloader and *which* firmware should the version
relation apply to?
And what is a "validation" exactly?

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 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).

Cheers,
    Matthias

-- 
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/


More information about the AppStream mailing list