find-lang.sh search path

Michael Schwendt mschwendt at gmail.com
Mon Jul 1 20:31:11 UTC 2013


On Mon, 01 Jul 2013 20:57:46 +0200, Antonio wrote:

> On Mon 01 Jul 2013 08:53:44 PM CEST, Michael Schwendt wrote:
> > On Mon, 01 Jul 2013 20:36:25 +0200, Antonio wrote:
> >
> >> In qgifer package building (Bug#979702), I need to include language
> >> *.qm files from source software.
> >>
> >> Currently, 'cmake' command puts language files into /usr/share/locale
> >> directory but find-lang.sh doesn't locate them in $RPM_BUILD_ROOT. Why ?
> >
> > The usage of %find_lang seems incorrect:
> >
> >> + /usr/lib/rpm/find-lang.sh
> >> /home/sagitter/rpmbuild/BUILDROOT/qgifer-0.2.1-1.fc19.x86_64 pl --with-qt
> >> No translations found for pl in
> >> /home/sagitter/rpmbuild/BUILDROOT/qgifer-0.2.1-1.fc19.x86_64
> >
> > There's a suspicious "pl" in there.
> >
> 
> "pl" is the file name without extension (pl.qm). In .spec file:
> 
> ...
> %find_lang pl --with-qt
> %find_lang ru --with-qt
> ...
> 
> Are they correct ?

No.

Multiple invocations of %find_lang is a consecutive fault after installing
the locale files wrongly. You would run %find_lang once only and give it
the common name of the files to search for. Most often that is the package
%{name}:

  https://fedoraproject.org/wiki/Packaging:Guidelines#Handling_Locale_Files

In your review request, the original path is

  %{_datadir}/%{name}/locale/*.qm

which looks more usual for Qt based projects.

> /usr/share/locale/pl.qm
> /usr/share/locale/ru.qm

This would conflict with any other project installing the files like
that. There is no %name prefix in there at all. No reference to the
qgifer name.

-- 
Fedora release 19 (Schrödinger’s Cat) - Linux 3.9.8-300.fc19.x86_64
loadavg: 0.08 0.06 0.05


More information about the devel mailing list