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

New AppData validation prevents building #304

Closed
mikhailnov opened this issue Aug 21, 2018 · 11 comments
Closed

New AppData validation prevents building #304

mikhailnov opened this issue Aug 21, 2018 · 11 comments

Comments

@mikhailnov
Copy link
Contributor

mikhailnov commented Aug 21, 2018

$ LANG=en_US.utf-8 appstream-util validate-strict -v ./obj-x86_64-linux-gnu/data/com.github.wwmm.pulseeffects.appdata.xml
(appstream-util:26386): As-DEBUG: 21:07:43.165: run appstream-util: validate-strict
./obj-x86_64-linux-gnu/data/com.github.wwmm.pulseeffects.appdata.xml: (appstream-util:26386): As-DEBUG: 21:07:43.170: checking https://raw.githubusercontent.com/wwmm/pulseeffects/master/images/appdata-screenshot-01.png
(appstream-util:26386): As-DEBUG: 21:07:43.566: checking https://raw.githubusercontent.com/wwmm/pulseeffects/master/images/appdata-screenshot-02.png
(appstream-util:26386): As-DEBUG: 21:07:43.801: checking https://raw.githubusercontent.com/wwmm/pulseeffects/master/images/appdata-screenshot-05.png
(appstream-util:26386): As-DEBUG: 21:07:43.994: Adding style-invalid '<caption> requires sentence case [Калибровка]'
(appstream-util:26386): As-DEBUG: 21:07:43.994: checking https://raw.githubusercontent.com/wwmm/pulseeffects/master/images/appdata-screenshot-04.png
(appstream-util:26386): As-DEBUG: 21:07:44.204: Adding style-invalid '<caption> requires sentence case [Компрессор]'
(appstream-util:26386): As-DEBUG: 21:07:44.204: checking https://raw.githubusercontent.com/wwmm/pulseeffects/master/images/appdata-screenshot-03.png
(appstream-util:26386): As-DEBUG: 21:07:44.410: Adding style-invalid '<caption> requires sentence case [Ограничитель ввода]'
(appstream-util:26386): As-DEBUG: 21:07:44.410: Adding style-invalid '<developer_name> is too long [Уоллис Веллингтон] maximum is 30 chars'
ОШИБКА:
• style-invalid         : <caption> requires sentence case [Калибровка]
• style-invalid         : <caption> requires sentence case [Компрессор]
• style-invalid         : <caption> requires sentence case [Ограничитель ввода]
• style-invalid         : <developer_name> is too long [Уоллис Веллингтон] maximum is 30 chars
Проверка файлов прошла неудачно

In all this cases the Russian translation is the first, if I remove the Russian lines, then appstream-util says OK.

E.g.

<caption xml:lang="ru">Компрессор</caption>
<caption xml:lang="sv">Kompressor</caption>
<caption xml:lang="sk">Kompresor</caption>
<caption xml:lang="pt_BR">Compressor</caption>
<caption xml:lang="it_IT">Compressore</caption>
<caption xml:lang="hr">Kompresor</caption>
<caption xml:lang="fr_FR">Compresseur</caption>
<caption xml:lang="de">Kompressor</caption>
<caption xml:lang="cs">Kompresor</caption>

I just removed the 1st Russian line, and then validation passed.
I don't understand what's wrong.
@AsavarTzeth
(83f6cd1)

@mikhailnov
Copy link
Contributor Author

validate-relax validates OK

mikhailnov added a commit to mikhailnov/pulseeffects that referenced this issue Aug 21, 2018
mikhailnov added a commit to mikhailnov/pulseeffects that referenced this issue Aug 21, 2018
@mikhailnov mikhailnov mentioned this issue Aug 21, 2018
@wwmm
Copy link
Owner

wwmm commented Aug 21, 2018

Based on what @AsavarTzeth told me before implementing the validations the AppStream standard recommends short lines in a few fields descriptions. That is why you have the too long messages. But when I built the package here there was no issue. It passed the validation. Did you do any changes to the translations?

@wwmm
Copy link
Owner

wwmm commented Aug 21, 2018

At least here the following commands run without problems:
meson _build
cd _build/;ninja
ninja test
ninja install

@mikhailnov
Copy link
Contributor Author

'Kompressor' and 'Компрессор' have the same lenght, but only 'Компрессор' gives errors.

ubuntu 18.04 has appstream-glib 0.7.7, Arch has 0.7.10, 0.7.10 from ubuntu 18.10 is buildable on 18.04, but one self-test fails strangely ...

@mikhailnov
Copy link
Contributor Author

I did not make any changes to po/ru.po

Here is my ./obj-x86_64-linux-gnu/data/com.github.wwmm.pulseeffects.appdata.xml generated during building:
https://paste.fedoraproject.org/paste/2-38HACuw~C102ONoon5RA

@AsavarTzeth
Copy link
Contributor

Well let's have a look at the actual errors:

• style-invalid         : <caption> requires sentence case [Калибровка]
• style-invalid         : <caption> requires sentence case [Компрессор]
• style-invalid         : <caption> requires sentence case [Ограничитель ввода]
• style-invalid         : <developer_name> is too long [Уоллис Веллингтон] maximum is 30 chars

The first three seems to be an upper case issue. However, even though I cannot read Russian it seems to be that this is not true? Maybe its an issue with appstream-util not recognizing cases with К and О, which I assume is upper case already.

The last error also seems untrue; it looks like its bellow 30 chars to me.

What version of appstream-util is used? (appstream-util --version)? Maybe there are some old bugs with Russion localizations that have been fixed in more recent versions? That could explain why we cannot reproduce this.

The reason validate-relax works okay is because you disable all validation of localizations and and much much more. Sure it is one solution, but I don't like to use it until we know the true source of the problem; especially if it cannot be reproduced by running meson directly.

AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
AsavarTzeth pushed a commit to AsavarTzeth/pulseeffects that referenced this issue Aug 24, 2018
@mikhailnov
Copy link
Contributor Author

both appstream-util 0.7.7 and latest 0.7.12 give the same result

@mikhailnov
Copy link
Contributor Author

ninja test without debian utils produces the same error

@mikhailnov
Copy link
Contributor Author

I wanted to set an anvironmental variable to switch validation to relaxed from debian/rules, but Meson does not support this
mesonbuild/meson#9

mikhailnov added a commit to mikhailnov/pulseeffects that referenced this issue Aug 28, 2018
* version 4.3.1 deb
* restore `appstream-util validate-strict`, but disable running autotests untill be find a better solution
* * wwmm#304
* * wwmm#305
* `dh_missing --fail-missing`: Fail the build if some produced files are not included in neither of multiple packages
* minor fixes in Russian localization
@mikhailnov mikhailnov mentioned this issue Aug 28, 2018
@wwmm
Copy link
Owner

wwmm commented Nov 22, 2018

Is this still a problem?

@mikhailnov
Copy link
Contributor Author

I did not try. I will try if I don't forget when a new version is released

@wwmm wwmm closed this as completed Dec 30, 2018
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

3 participants