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

Validate false positive #308

Closed
gunnarhj opened this issue Feb 24, 2021 · 4 comments
Closed

Validate false positive #308

gunnarhj opened this issue Feb 24, 2021 · 4 comments

Comments

@gunnarhj
Copy link

Hi!

$ appstreamcli --version
AppStream version: 0.14.1

$ appstreamcli validate /usr/share/metainfo/emoji-picker.appdata.xml
E: org.freedesktop.ibus.engine.typing_booster.emoji_picker:17: web-url-expected
     
     https://raw.githubusercontent.com/mike-fabian/ibus-typing-booster/master/icons/64x64/ibus-typing-booster.png

Validation failed: errors: 1

The URL is valid as far as I can tell.

Typing Booster

What am I missing?

@ximion
Copy link
Owner

ximion commented Feb 24, 2021

Can you attach the metadata? I guess there are some spaces or tabs interfering here, but AppStream should strip these away.

@gunnarhj
Copy link
Author

Sure, it's line 17.

emoji-picker.appdata.xml.gz

@gunnarhj
Copy link
Author

gunnarhj commented Feb 24, 2021

I can add that it didn't complain a couple of months ago (more precisely version 0.12.11), so I suspect it is some kind of regression.

@ximion ximion closed this as completed in 3c64bf0 Feb 24, 2021
@ximion
Copy link
Owner

ximion commented Feb 24, 2021

Jup, this was broken in the 0.14.1 release. It's resolved now, unfortunately there is no easy workaround for you.
Fortunately though, AppStream 0.14.2 will likely be released next week.
Thank you very much for reporting this issue!

gunnarhj referenced this issue in mike-fabian/ibus-typing-booster Feb 24, 2021
When using:

  <icon type="remote" width="64" height="64">https://raw.githubusercontent.com/mike-fabian/ibus-typing-booster/master/icons/64x64/ibus-typing-booster.png</icon>

appstream-util validates OK:

    $ appstream-util validate-relax emoji-picker.appdata.xml
    emoji-picker.appdata.xml: OK

But newer versions of appstreamcli fail:

    $ appstreamcli validate --pedantic --no-net /usr/share/metainfo/emoji-picker.appdata.xml
    E: org.freedesktop.ibus.engine.typing_booster.emoji_picker:17: web-url-expected

         https://raw.githubusercontent.com/mike-fabian/ibus-typing-booster/master/icons/64x64/ibus-typing-booster.png

    Validation failed: errors: 1

When using:

    <icon type="stock">ibus-typing-booster</icon>

appstreamcli validates OK:

    $ appstreamcli validate --pedantic --no-net emoji-picker.appdata.xml

    Validation was successful.

but appstream-util complains:

    $ appstream-util validate-relax emoji-picker.appdata.xml
    emoji-picker.appdata.xml: FAILED:
    • tag-invalid           : <icon> not allowed in desktop appdata
    • tag-invalid           : stock icon is not valid [ibus-typing-booster]
    Validation of files failed

Just removing the icon completely makes both validators validate OK.
mike-fabian added a commit to mike-fabian/ibus-typing-booster that referenced this issue Mar 11, 2021
This was a false positive by appstreamcli, see:

ximion/appstream#308
ximion/appstream#308 (comment)

> Jup, this was broken in the 0.14.1 release. It's resolved now,
> unfortunately there is no easy workaround for you.  Fortunately
> though, AppStream 0.14.2 will likely be released next week.
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