appstream-glib icon indicating copy to clipboard operation
appstream-glib copied to clipboard

appstream-util validate doesn’t mention empty <font> element

Open pwithnall opened this issue 4 years ago • 2 comments

If I run the following two commands, I get different results, and appstreamcli seems to catch more problems:

$ appstream-util validate-relax /usr/share/metainfo/org.fedoraproject.material-icons-fonts.metainfo.xml
/usr/share/metainfo/org.fedoraproject.material-icons-fonts.metainfo.xml: OK
$ appstreamcli validate /usr/share/metainfo/org.fedoraproject.material-icons-fonts.metainfo.xml
I: org.fedoraproject.material-icons-fonts:4: cid-contains-hyphen org.fedoraproject.material-icons-fonts
W: org.fedoraproject.material-icons-fonts:18: tag-empty font
I: org.fedoraproject.material-icons-fonts:12: unknown-tag updatecontact
W: org.fedoraproject.material-icons-fonts:6: spdx-license-unknown ASL 2.0

Validation failed: warnings: 2, infos: 2
$ cat /usr/share/metainfo/org.fedoraproject.material-icons-fonts.metainfo.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- SPDX-License-Identifier: MIT -->
<component type="font">
  <id>org.fedoraproject.material-icons-fonts</id>
  <metadata_license>MIT</metadata_license>
  <project_license>ASL 2.0</project_license>
  <name>Material Icons</name>
  <summary><![CDATA[Google material design system icons]]></summary>
  <description>
    <p><![CDATA[Material design icons is the official icon set from Google.  The icons are designed under the material design guidelines.]]></p>
  </description>
  <updatecontact>[email protected]</updatecontact>
  <url type="homepage">https://google.github.io/material-design-icons/</url>
  <releases>
    <release version="4.0.0-1.fc33" date="2020-12-03"/>
  </releases>
  <provides>
    <font></font>
    <font>Material Icons</font>
  </provides>
</component>

appstream-util validate doesn’t catch it either; I used validate-relax since that’s what’s used when building the material-icons-fonts RPM.

See also:

  • https://bugzilla.redhat.com/show_bug.cgi?id=1943727
  • https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/671

pwithnall avatar Mar 26 '21 23:03 pwithnall

A reasonable response to this issue might be to ignore it and start shifting people over to using appstreamcli validate instead of appstream-util validate, if all other things are equal. :shrug:

pwithnall avatar Mar 26 '21 23:03 pwithnall

start shifting people over to using appstreamcli validate instead of appstream-util validate

FWIW, I'm fine with that.

hughsie avatar Mar 29 '21 09:03 hughsie