Bug 1293468

Summary: Whitespace inside gimp-elsamuko metainfo.xml
Product: [Fedora] Fedora Reporter: Luya Tshimbalanga <luya>
Component: gimp-elsamukoAssignee: Luya Tshimbalanga <luya_tfz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: design-devel, klember, luya, luya_tfz, ravnzon, rhughes
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gimp-elsamuko-26-1.fc22 gimp-elsamuko-26-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-24 22:50:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luya Tshimbalanga 2015-12-21 20:02:57 UTC
Description of problem:
Upstream included appdata in the package but Gnome Software will not display it.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Remove downstream appstream in favour of upstream
2.
3.

Actual results:
Not displaying on Gnome Software

Expected results:
Gnome Software should list gimp-elsamiko as addon

Additional info:
https://apps.fedoraproject.org/packages/gimp-elsamuko/sources/

Comment 1 Luya Tshimbalanga 2016-01-10 04:00:14 UTC
Looking at the directory, the metainfo.xml is listed with full specification.
$ ls /usr/share/appdata/ | grep elsamuko
gimp-elsamuko.metainfo.xml


Spec from upstream is 

<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
  <id>gimp-elsamuko</id>
  <extends>gimp.desktop</extends>
  <name>gimp-elsamuko</name>
  <summary>Collection of GIMP scripts</summary>
  <url type="homepage">https://sites.google.com/site/elsamuko/gimp</url>
  <url type="bugtracker">https://github.com/elsamuko/gimp-elsamuko/issues</url>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-3.0+</project_license>
</component>


The installation worked but Gnome Software will still not display the addon.

Comment 2 Richard Hughes 2016-01-11 12:46:11 UTC
We only show metainfo files for valid metainfo data that made it into the repodata; for this package I see https://github.com/hughsie/createrepo_as_logs/blob/master/g/gimp-elsamuko.log in the logs. Does "appstream-util validate *.metainfo.xml" work?

Comment 3 Luya Tshimbalanga 2016-01-11 17:37:35 UTC
$ appstream-util validate-relax --nonet metainfo.xml
metainfo.xml: Failed to parse /home/luya/rpmbuild/SOURCES/gimp-elsamuko-master/metainfo.xml file: Error on line 2 char 2: Document must begin with an element (e.g. <book>)

I am confused with that part. Does that mean metainfo.xml included by upstream needs to be named as "gimp-elsamuko.metainfo.xml" as it appears to miss "gimp-elsamuko" as prefix?
See

Comment 4 Luya Tshimbalanga 2016-01-11 17:50:04 UTC
Take a loot at the upstream package:
https://github.com/elsamuko/gimp-elsamuko/archive/master.zip

Comment 5 Luya Tshimbalanga 2016-01-11 23:46:34 UTC
looking closer at the metainfo.xml, I managed to fix one problem (removal of invisible space) and face another issue

$ appstream-util validate-relax --nonet metainfo.xml
metainfo.xml: Failed to parse /home/luya/rpmbuild/SOURCES/gimp-elsamuko-master/metainfo.xml file: Error on line 4 char 7: <component> already set '
  ' and tried to replace with '
  '
It is hard to see where is the error as the ' ' is no where to see. Could it be that appstream-lib is somewhat broken?

Comment 6 Luya Tshimbalanga 2016-01-15 08:21:14 UTC
After investigating the metainfo file from gimp-elsamuko, I removed further extra empty space and use tab which reduced the complain from appstream-lib. 
Appsteam-lib now complains about:


$ appstream-util validate Downloads/gimp-elsamuko.metainfo.xml 
Downloads/gimp-elsamuko.metainfo.xml: FAILED:
• tag-missing           : <update_contact> is not present
Validation of files failed

Yet no where in the guidelines mentioned that tag within the add-on section:
https://fedoraproject.org/wiki/Packaging:AppData
http://freedesktop.org/software/appstream/docs/sect-Metadata-Addon.html

However, using "appstream-util validate-relax --nonet " command solved the issue. I will submit the fix to upstream and will let you know when it is done.

Comment 7 Luya Tshimbalanga 2016-01-16 00:32:41 UTC
Assigning this report to gimp-elsamuko. Upstream put the fix and test will be needed to check Gnome Software display that addon.

Comment 8 Fedora Update System 2016-01-16 00:40:14 UTC
gimp-elsamuko-26-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a69c4d0f5b

Comment 9 Luya Tshimbalanga 2016-01-16 02:02:18 UTC
Actually switch to gimp-elsamuko.

Comment 10 Fedora Update System 2016-01-16 19:24:47 UTC
gimp-elsamuko-26-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a69c4d0f5b

Comment 11 Fedora Update System 2016-01-17 14:22:23 UTC
gimp-elsamuko-26-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4d7463de24

Comment 12 Fedora Update System 2016-01-24 22:50:00 UTC
gimp-elsamuko-26-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-01-26 18:27:10 UTC
gimp-elsamuko-26-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.