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

Answering none to all questions leads failing validation with appstreamcli validate #18

Closed
aral opened this issue Aug 21, 2018 · 9 comments

Comments

@aral
Copy link

aral commented Aug 21, 2018

To reproduce

Using the Open Age Ratings Service (https://hughsie.github.io/oars/generate.html):

  1. Select “Application that does not use the Internet”

  2. Select either OARS version 1.0 or 1.1 (same result in each)

  3. For every other question, leave the None setting.

    At the end you will get:

    <content_rating type="oars-1.1" />
  4. Add this to your appdata.xml and validate it using appstreamcli validate …

What should happen

It should validate.

What actually happens

Validation fails with the following warning:

W - ind.ie.Gnomit.appdata.xml.in:ind.ie.Gnomit.desktop:47
    Found empty 'content_rating' tag.

Note: Validation passes with appstream-util validate-relax

@aral aral changed the title Answering none to all questions leads to invalid string Answering none to all questions leads failing validation with appstreamcli validate Aug 21, 2018
@har9862
Copy link

har9862 commented Aug 22, 2018

The specs should probably also be updated to accommodate omitting all tags if all of its values are set to none, as it now contradicts this:

The <content_rating/> must have <content_attribute/> children which each have an id property indicating the specific section that is rated.

@ximion
Copy link

ximion commented Oct 23, 2018

Having an empty content_rating tag was not originally intended by the specification, so OARS changing that without changing the spec first wasn't so awesome.
However, the validator has been adjusted meanwhile, so appstreamcli will now consider empty content_rating tags to be valid.
Update to AppStream >= 0.12.3 to get the change.
So this issue could likely be closed.

elelay added a commit to gpodder/gpodder that referenced this issue Dec 28, 2018
@elelay
Copy link

elelay commented Dec 29, 2018

@ximion appstreamcli 0.12.4 still shows the warning:

> appstreamcli --version
AppStream version: 0.12.4
> appstreamcli validate share/metainfo/org.gpodder.gpodder.appdata.xml
W - org.gpodder.gpodder.appdata.xml:org.gpodder.gpodder:18
    Found empty 'content_rating' tag.

Validation failed: warnings: 1

Is it expected?

@ximion
Copy link

ximion commented Dec 29, 2018

@elelay No - are you sure you also have the right version of libappstream installed, in addition to appstreamcli? (ascli should actually show a mismatch when --version is passed in that case...)

@elelay
Copy link

elelay commented Dec 29, 2018

No mismatch reported. I'm on ArchLinux, fully up to date.
Could it be something with org.gpodder.gpodder.appdata.xml?

> ls /usr/lib/libappstream.so*
/usr/lib/libappstream.so  /usr/lib/libappstream.so.0.12.4  /usr/lib/libappstream.so.4

@tsdgeos
Copy link

tsdgeos commented Apr 12, 2019

This is still happening

$ appstreamcli --version
AppStream version: 0.12.6

$ appstreamcli validate ../src/org.kde.kgeography.appdata.xml
W - org.kde.kgeography.appdata.xml:org.kde.kgeography.desktop:248
Found empty 'content_rating' tag.

Can we please get this fixed?

@hughsie
Copy link
Owner

hughsie commented Apr 13, 2019

AppStream version: 0.12.6

Then it's appstreamcli validate at fault, not OARS, sorry.

@hughsie hughsie closed this as completed Apr 13, 2019
@ximion
Copy link

ximion commented Apr 13, 2019

This was a regression that is fixed in newer versions of AppStream (currently not released).

@tsdgeos
Copy link

tsdgeos commented Apr 13, 2019

@ximion any ETA for it?

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

6 participants