New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
font-metainfo-but-no-font error on valid font packages #77
Comments
|
I can reproduce this here, but the issue is in your metadata (it is a bit tricky to see though!). Please validate your data with Furthermore, as per https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Fonts.html#tag-font-provides the name of the font in its provides name should be its (first) full name - the family/style combo is a fallback in case the font author forgot to set a full name. For this particular font, its first known name is actually "Dyuthi" and not "Dyuthi Regular" for some reason. <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2019 Swathanthra Malayalam Computing <contact@smc.org.in> -->
<component type="font">
<id>in.org.smc.dyuthi</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>OFL-1.1 OR (GPL-3.0-or-later WITH Font-exception-2.0)</project_license>
<name>Dyuthi font</name>
<name xml:lang="ml">ദ്യുതി അക്ഷരസഞ്ചയം</name>
<summary>Dyuthi Malayalam Unicode font</summary>
<description>
<p>
Unicode font for traditional Malayalam script designed by Hiran
Venugopalan maintained by Swathanthra Malayalam Computing. Ornamental
font suitable for titles.
</p>
</description>
<update_contact>contact_at_smc_org_in</update_contact>
<provides>
<font>Dyuthi</font>
</provides>
<languages>
<lang>ml</lang>
</languages>
<url type="homepage">https://smc.org.in/fonts</url>
<url type="bugtracker">https://gitlab.com/smc/fonts/dyuthi/issues</url>
<custom>
<value key="FontSampleText">മനുഷ്യരെല്ലാവരും തുല്യാവകാശങ്ങളോടും അന്തസ്സോടും
സ്വാതന്ത്ര്യത്തോടും കൂടി ജനിച്ചവരാണ്. അന്യോന്യം ഭ്രാതൃഭാവത്തോടെ പെരുമാറുവാനാണ്
മനുഷ്യന്നു വിവേകബുദ്ധിയും മനസ്സാക്ഷിയും സിദ്ധമായിരിക്കുന്നത്.</value>
<value key="FontIconText">അഇ</value>
</custom>
</component>This should work. When you validate the file, it will also complain that https://smc.org.in/fonts throws a 404 error, which is indeed true (with a redirect on the website to the default page). And yes, this is indeed the right place for suspected bug and questions for appstream-generator :-) |
This should make it more obvious what the problem is for cases such as issue #77
|
Thanks for the quick response @ximion
This was kinda intentional, knowing that |
Yes, but the values you put in there are not read by anything in GNOME, but are read by appstream-generator (or rather would be if they were in a "custom" tag). Also, the "metadata" thing isn't even used by GNOME anymore and is considered legacy. Also also, this data is stripped away by the generator, so it will never reach any GNOME desktop - and when the custom tag is used, it is used either locally for app-specific metadata, or for a case like this one, where Where did you get the idea to use "metadata" from? Maybe there is some documentation piece out there that needs to be fixed. The text on my blog (from 2017!) at least doesn't mention it and suggests using the custom tag when required: https://blog.tenstral.net/2017/09/adding-fonts-to-software-centers.html |
From memory, I believe it originated when the maintainer of these font packages in Fedora wrote it initially, and they upstreamed it. I couldn't find any other references to why it was used. Anyway I will switch it to
Makes sense. Are |
|
Ah, interesting!
No, those two are the only ones. The "custom" values usually shouldn't be needed, they are really intended for app-specific or vendor-specific additions that don't make sense to have in the specification (like, extra CSS rules for GNOME Software). That's also why asgen will filter the values out using a whitelist (I know some automobile Linux shells have a bunch of extra custom values, those would be whitelisted by the vendor in order to reach the final metadata). The reason asgen uses the custom tag for this at all is simply that fonts are weird, and really hard to support in a consistent manner, as the metadata within font files is usually really bad - so the metainfo file may have to contain more metadata than the AppStream spec currently permits in order to generate a good-looking result. The |
@ximion This was my next question. I know |
|
The only way to check what asgen produces locally would be to run it locally - while asgen has a mechanism to inject metadata for quicker testing, running it still isn't super simple, as some kind of Debian mirror (can be partial and can be a tiny archive) would still be needed. If you want to test a lot of packages I would suggest creating a local repository from them using reprepro/apt-ftparchive and point asgen at that. If you have fewer packages, I would just upload them to Debian and then see what the result looks like (the asgen HTML pages will show you the raw metadata, which includes links to screenshots and icons - or you'd just run gnome-software locally) |
|
Thanks for all the info. |
[Apologies if this issue tracker is not the right place for this query]
I maintain the following font packages in Debian
All of them have similar appstream XML files, but I am seeing both Debian and Ubuntu appstream reports showing the
font-metainfo-but-no-fonterror for many of those packages. For example, consider the packagefonts-smc-dyuthi.As seen, the appstream XML file does have a
<provides>...<font>directive, the package does include the font, and the font name matches what is given in XML file. Still, https://appstream.ubuntu.com/groovy/main/issues/fonts-smc-dyuthi.html and https://appstream.debian.org/sid/main/issues/fonts-smc-dyuthi.html reports thefont-metainfo-but-no-fonterror for the package.Other packages with the same issue are
What is more interesting is that this issue does not happen on 4 packages, which follow the same XML syntax -
fonts-smc-uroob,fonts-smc-raghumalayalamsans,fonts-smc-keraleeyam, andfonts-smc-suruma.The text was updated successfully, but these errors were encountered: