hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.
GNU Lesser General Public License v2.1
65 stars 103 forks source link

Include screenshot size in all error messages #464

Closed suve closed 1 year ago

suve commented 1 year ago

Screenshot validation includes checking the image size, i.e:

Currently, when the first check fails, the error message includes the actual screenshot width. This is not the case for other checks - they do not contain any information about the dimensions. This patch fixes this inconsistency by making all four checks include the relevant information in their error message.

hughsie commented 1 year ago

Medium term I think we should point people at appstreamcli. Does this PR still pass ninja test?

suve commented 1 year ago

Does this PR still pass ninja test?


[65/66] Running all tests.
1/2 asb-self-test        OK              0.09s
2/2 as-self-test         OK              0.19s

Ok: 2
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0



> Medium term I think we should point people at `appstreamcli`.

[Fedora's packaging guidelines on AppStream files](https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/) require running `appstream-util validate-relax` on said files. I guess long term we'd want to switch to `appstreamcli` here, as well?
hughsie commented 1 year ago

I guess long term we'd want to switch to appstreamcli here, as well?

I think so. Thanks!