Bug 1411037 - tag-invalid <icon> not allowed in appdata
Summary: tag-invalid <icon> not allowed in appdata
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libappstream-glib
Version: 25
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened, Triaged
Depends On:
Blocks: 1409528
TreeView+ depends on / blocked
 
Reported: 2017-01-07 19:00 UTC by Gerald Cox
Modified: 2017-12-12 10:11 UTC (History)
4 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-12-12 10:11:44 UTC


Attachments (Terms of Use)

Description Gerald Cox 2017-01-07 19:00:58 UTC
Description of problem:

I received an update to the weather-widget and am getting this error now when
I try to rebuild:

FAILED: 
? tag-invalid           : <icon> not allowed in appdata 
? tag-invalid           : stock icon is not valid [weather-widget] 
Validation of files failed

My understanding was that the desktop entry spec file was used to generate the desktop and xml files.  Both are generated to include the icon tag - but now according to appstream-util this isn't allowed in the xml file any longer.  I checked in /usr/share/appdata and did a random check on org.kde.plasma.colorpicker.appdata.xml among others and they also have the <icon> tag and also now fail.

I also looked here:
https://www.freedesktop.org/software/appstream/docs/chap-CollectionData.html#sect-AppStream-XML

and it appears that the <icon> tag is valid.


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

How reproducible:

appstream-data validate-relax --nonet


Actual results:
FAILED: 
? tag-invalid           : <icon> not allowed in appdata 
? tag-invalid           : stock icon is not valid [weather-widget] 
Validation of files failed


Expected results:
No errors

Additional info:

Comment 1 Richard Hughes 2017-01-11 08:49:11 UTC
I agree icons should be allowed in appdata files, but weather-widget and color-picker are not stock icon names.

Comment 2 Richard Hughes 2017-01-11 09:23:28 UTC
I think appstream-util has always forbidden <icon> in appdata files, although that should have been restricted to desktop-type appdata components, not the 'generic' type that plasma uses.

I've fixed that in https://github.com/hughsie/appstream-glib/commit/5b6fd6c9c90e5dc4533388183fcb5c114791569e

Note: this is still a valid validation failure:

• tag-invalid           : stock icon is not valid [color-picker]

...color-picker is not a stock icon name. I think removing the "type=stock" upstream will make the validator pass, and also the appstream-builder happier.

Comment 3 Gerald Cox 2017-02-06 12:25:22 UTC
Question, when will this patch be included in Fedora?

Comment 4 Kalev Lember 2017-02-06 12:52:25 UTC
It's already in Fedora as part of libappstream-glib 0.6.7 and 0.6.8 releases.

Comment 5 Gerald Cox 2017-03-02 17:25:48 UTC
(In reply to Richard Hughes from comment #2)
> I think appstream-util has always forbidden <icon> in appdata files,
> although that should have been restricted to desktop-type appdata
> components, not the 'generic' type that plasma uses.
> 
> I've fixed that in
> https://github.com/hughsie/appstream-glib/commit/
> 5b6fd6c9c90e5dc4533388183fcb5c114791569e
> 
> Note: this is still a valid validation failure:
> 
> • tag-invalid           : stock icon is not valid [color-picker]
> 
> ...color-picker is not a stock icon name. I think removing the "type=stock"
> upstream will make the validator pass, and also the appstream-builder
> happier.

Richard, I'm working on the 1.6.9 release of the widget and am still getting:
plasma-applet-weather-widget.x86_64: E: invalid-appdata-file /usr/share/appdata/org.kde.weatherWidget.appdata.xml

So it appears that this error is still be generated for plasma.  Any ideas?  Thanks again for your help.  Reopening since the fix doesn't appear to have addressed this issue.

Comment 6 Fedora End Of Life 2017-11-16 19:08:09 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-12-12 10:11:44 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.