Bug 67368

Summary: find-lang.sh matches too many files
Product: [Retired] Red Hat Raw Hide Reporter: David Nečas <yeti>
Component: redhat-rpm-configAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-28 14:55:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch none

Description David Nečas 2002-06-23 18:07:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/0

Description of problem:
find-lang.sh uses following regexp to match .mo files for given PACKAGE_NAME
argument (called $NAME below)

\(.*/share/locale/\)\([^/_]\+\)\(.*'"$NAME"'\.mo$\)

so when called with argument `xxx', not only `xxx.mo' matches --
`abosulutely-anything-xxx.mo' matches too.  In my case `gimp-libgimp' was
matched as `gimp' package name.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Actual reproduction involves gimp package building in my case -- which has
enough other problems itself, so:

$ mkdir -p rootdir/usr/share/locale/en/LC_MESSAGES
$ touch rootdir/usr/share/locale/en/LC_MESSAGES/util-linux.mo
$ /usr/bin/rpm/find-lang.sh rootdir linux


Actual Results:  File linux.lang is created and it contains:

%defattr (644, root, root, 755)
%lang(en) /usr/share/locale/en/LC_MESSAGES/util-linux.mo


Expected Results:  linux.lang doesn't contain the second line (we asked for
`linux' not `util-linux').

Additional info:

A patch is included.

Comment 1 David Nečas 2002-06-23 18:08:13 UTC
Created attachment 62265 [details]
Patch

Comment 2 Jeff Johnson 2002-06-28 14:55:37 UTC
CHecked into CVS, should be in rpm-4.1-0.36 when built.

Thanks for the patch.

Comment 3 Elliot Lee 2002-07-11 18:46:21 UTC
put into redhat-rpm-config CVS