[AppStream] Adding another component specifier for variant

Richard Hughes hughsient at gmail.com
Mon Sep 23 12:51:28 UTC 2019


On Mon, 23 Sep 2019 at 13:36, Matthias Klumpp <matthias at tenstral.net> wrote:
> Okay. I don't think I fully understand the problem, so let me ask a
> few possibly dumb questions in order to understand the whole process a
> bit better.

There are no such things as dumb questions, only lack of documentation :)

> Why is there a category "X-SystemUpdate" for this? Why isn't "Lenovo
> ThinkPad P50 System Update" the component name and the component of
> type="firmware"?

Good question. The <name> isn't translated by the vendor, ever. It's
typically a trademark and designed to be the same in all languages and
locales. We do want the "System Update" bit translated tho, and this
is why we do the client-side appending. We also don't want the
category in all cases, e.g. if we're showing a list of hardware we
don't want a hundred "System Update" words at all, we just need the
device name.

> Why is the GUID in a <provides/> tag? (and why type of provided item
> is this? modalias?)

It's a GUID, e.g.

  <provides>
    <!-- USB\VID_17EF&PID_3083 -->
    <firmware type="flashed">d66bf84b-c3ba-508c-bc55-0d445413d3d4</firmware>
  </provides>

> If the firmware update requires a certain system
> with a specific GUID, this should be mentioned in a <requires/> or
> possibly <recommends/> tag, shouldn't it?

Yes, we use <requires> if we need a specific fwupd version, for instance:

  <requires>
    <id compare="ge" version="1.3.2">org.freedesktop.fwupd</id>
  </requires>

> So, there are two components here, that provide/require different
> GUIDs dependent on which model variant the firmware is for, right?

Yes.

>In that case, why is the <name/> field identical for those?

A good question. I think the idea is that we only show the "variant"
if there are multiple components with the same visual name, so we
wouldn't have:

* ThinkPad X1 (US)
* ThinkPad P70 (US)
* ThinkPad P50 (US)
* ThinkPad P51 (US)
* ThinkPad P51 (China)
* ThinkPad P51 (US)

> Also, they
> surely must have different component-ids, if they actually are
> multiple components...

Yes, the component IDs are different with the different variants.

> What's a branch? That doesn't exist in AppStream...

Hmm, that might be a flatpak thing; forget I mentioned it :)

> Having variants with the same ID kind of defeats that, but maybe I am
> also just not getting the point here yet.

A different ID is used at the moment.

Thanks,

Richard


More information about the AppStream mailing list