hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.
GNU Lesser General Public License v2.1
65 stars 103 forks source link

appstream-build: Relax <extends/> requirements #482

Closed mcrha closed 6 months ago

mcrha commented 6 months ago

The (upstream) appstream data can reference multiple apps as their <extends/>, typically addons for the Web browsers, but the builder rejects the addon if any of the referenced apps cannot be found. It should reject it only if all of them are unknown, or I'd even let it be installed regardless of the <extends/> content, just warn about the problem.

Example:

  <component type="addon">
    <id>icedtea-web</id>
    <pkgname>icedtea-web</pkgname>
    <name>Java</name>
    <summary>Browser plug-in implementation from OpenJDK. This plugin is running java applets</summary>
    <vetos>
      <veto>icedtea-web has no parent of 'epiphany.desktop'</veto>
    </vetos>
    <project_license>GPL-2.0-only AND GPL-2.0-only WITH Classpath-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH Classpath-exception-2.0 AND LGPL-2.1-or-later AND Zlib</project_license>
    <url type="homepage">http://icedtea.classpath.org/wiki/IcedTea-Web</url>
    <extends>epiphany.desktop</extends>
    <extends>firefox.desktop</extends>
    <extends>midori.desktop</extends>
  </component>

In Fedora 40:

If at least Epiphany or Firefox had been properly referenced, the app would be still dropped from the appstream-data package due to no Midori in Fedora 40.