Skip to content
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

"Validation failed" for addons without long description #27

Closed
BenWiederhake opened this issue Feb 18, 2016 · 3 comments
Closed

"Validation failed" for addons without long description #27

BenWiederhake opened this issue Feb 18, 2016 · 3 comments

Comments

@BenWiederhake
Copy link

How to reproduce: Use the example file for addons and remove zero-width spaces at the start of each line (snafu of a different project), yielding:

<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
  <id>gedit-code-assistance</id>
  <extends>gedit.desktop</extends>
  <name>Code Assistance</name>
  <summary>Code assistance for C, C++ and Objective-C</summary>
  <url type="homepage">http://projects.gnome.org/gedit</url>
  <metadata_license>CC0-1.0</metadata_license>
  <project_license>GPL-3.0+</project_license>
</component>

Then, try to validate the file.

Expected behavior: reference implementation validator and example in documentation agree on what is considered "correct", and the file passes validation.

Actual behavior (where ./appstreamcli is freshly built from master):

$ appstreamcli --version
AppStream-CLI-Werkzeugversion: 0.9.0
$ appstreamcli validate /tmp/as.xml 
Validierung fehlgeschlagen.
$ ./appstreamcli --version
AppStream-CLI-Werkzeugversion: 0.9.2
$ ./appstreamcli validate /tmp/as.xml 
E - as.xml:gedit-code-assistance
    The component is missing a long description. Components of this type must have a long description.

Validierung fehlgeschlagen.

So, who is right? The documentation clearly doesn't mention description as required:

For a component of type addon, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>, <extends/>. 

EDIT: This isn't add-on specific. The "example for a very basic component" doesn't have a description, either.

EDIT 2: Tested 0.9.1 on a different system

$ appstreamcli --version
AppStream-CLI-Werkzeugversion: 0.9.1
$ appstreamcli validate --pedantic telegram-purple.metainfo.xml 
Validierung fehlgeschlagen.
@ximion
Copy link
Owner

ximion commented Feb 18, 2016

appstreamcli is the reference validator, and usually correct - except in this case, in this case the specification is right :D - the description should be available for addons, but it's no hard requirement (although right now I wonder if it should be...)

@ximion ximion closed this as completed in c98beba Feb 18, 2016
@BenWiederhake
Copy link
Author

It shouldn't.

In our case, we have:

<id>telegram-purple</id>
<summary>A plugin that adds support for Telegram</summary>

And that's all there is to say in this case. I'm sure that there are many more plugins that "only" add very little, and therefore can be exhaustively described in a single sentence.

Of course it's a wholly different thing when you talk about applications. These should always have long descriptions, in my eyes.

@ximion
Copy link
Owner

ximion commented Feb 18, 2016

The description wouldn't have to be very long, it could probably just be something like:

<description>
  <p>
    Enhance Telepathy client applications with support for the Telegram mobile instant messenger.
    This plugin supports the following features: ....
  </p>
</description>

But I agree, for most plugins this doesn't make much sense, and it's likely best to not force people to write descriptions just for their own sake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants