hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

pwithnall opened this issue · 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>fonts@lists.fedoraproject.org</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:

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

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

FWIW, I'm fine with that.