Overview

Request 856708 accepted

- Add subpackages: common, libeiskaltdcpp2_4, daemon, cli.
- Add separete lang subpackeges: common-lang, qt-lang.
- Change all descriptions.

Loading...

Илья Индиго's avatar

Please check this package or just check it (it was previously checked and there have been only minor changes since then).


Ismail Dönmez's avatar

I'll approve this review since I don't see anything important but for next time: s/separete/separate/ in the changes file.


Илья Индиго's avatar

Please check if I have created the language subpackages correctly. Especially the qt-lang subpackage.

%find_lang %{name} %{name}-qt.lang --with-qt --without-mo --all-name

Without --all-name, it does not find localization files, no matter which first parameter I specify for the find_lang macro. With --all-name, it always finds localization files, no matter what the first parameter I specify for the find_lang macro. I'm not sure if it's okay. This should work without --all-name.

Also, the qt-lang subpackage is not automatically loaded when installing qt.


Fabian Vogt's avatar

It seems like it installs the files in a way which doesn't follow any of the patterns recognized by /usr/lib/rpm/find-lang.sh. With --all-name it basically accepts everything ending in .qm:

find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
'"$ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\([^/]\+_qt\.qm$\):%lang(\2) \1\2\3\4:
'"$NO_ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\('"$NAME"'_qt\.qm$\):%lang(\2) \1\2\3\4:
'"$NO_ALL_NAME$QT"'s:^\([^%].*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
s:^[^%].*::
'"$ONLY_C"'/%lang(C)/!d
'"$NO_C"'/%lang(C)/d
s:%lang(C) ::
/^$/d' >> $MO_NAME_NEW

As you only have a single lang package for that, using --all-name is fine here.

The automatic provides handling for translation packages only works in certain circumstances (right package name and file format): https://github.com/openSUSE/rpm-config-SUSE/blob/9001ae42ea1dcdf2205ecb15d5994a41a55d0f0a/scripts/locale.prov

Here you could add Recommends: %{name}-qt-lang to the qt subpackage or just put them into the qt package directly.


Илья Индиго's avatar

Thank you for your reply. It's just not clear why it works in transmission, but I don't.

https://build.opensuse.org/package/view_file/GNOME:Apps/transmission/transmission.spec?expand=1

%lang_package -n %{name}-qt

%find_lang transmission transmission-qt.lang --with-qt --without-mo %{?no_lang_C}

%files -n %{name}-qt-lang -f %{name}-qt.lang %dir %{_datadir}/%{name}/translations

I see the difference only in the last line, my localization files are in

%dir %{_datadir}/%{name}/qt/translations

but even if I specify

%find_lang %{name}/qt %{name}-qt.lang --with-qt --without-mo

This still does not work, and the find_lang macro does not write any useful information to the build log.

https://github.com/openSUSE/rpm-config-SUSE/blob/9001ae42ea1dcdf2205ecb15d5994a41a55d0f0a/scripts/locale.prov

l="${line%%/LC_MESSAGES/*}"

If I understand correctly, this will only work with /usr/share/locale//LC_MESSAGES/.mo


Fabian Vogt's avatar

> Thank you for your reply. It's just not clear why it works in transmission, but I don't.

The files in transmission are called e.g. transmission_de.qm, while here it's just de.qm without the name.

> If I understand correctly, this will only work with /usr/share/locale//LC_MESSAGES/.mo

Yup.


Илья Индиго's avatar

Thank you, now it's clear. :-)

Request History
Илья Индиго's avatar

13ilya created request

- Add subpackages: common, libeiskaltdcpp2_4, daemon, cli.
- Add separete lang subpackeges: common-lang, qt-lang.
- Change all descriptions.


Saul Goodman's avatar

licensedigger accepted review

ok


Dominique Leuenberger's avatar

dimstar_suse added as a reviewer

Being evaluated by staging project "openSUSE:Factory:Staging:adi:70"


Dominique Leuenberger's avatar

dimstar_suse accepted review

Picked "openSUSE:Factory:Staging:adi:70"


Factory Auto's avatar

factory-auto added opensuse-review-team as a reviewer

Please review sources


Factory Auto's avatar

factory-auto accepted review

Check script succeeded


Ismail Dönmez's avatar

namtrac accepted review


Dominique Leuenberger's avatar

dimstar_suse accepted review

Staging Project openSUSE:Factory:Staging:adi:70 got accepted.


Dominique Leuenberger's avatar

dimstar_suse approved review

Staging Project openSUSE:Factory:Staging:adi:70 got accepted.


Dominique Leuenberger's avatar

dimstar_suse accepted request

Staging Project openSUSE:Factory:Staging:adi:70 got accepted.

openSUSE Build Service is sponsored by