Bug 67368 - find-lang.sh matches too many files
Summary: find-lang.sh matches too many files
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: redhat-rpm-config
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-23 18:07 UTC by David Nečas
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-06-28 14:55:58 UTC
Embargoed:


Attachments (Terms of Use)
Patch (434 bytes, patch)
2002-06-23 18:08 UTC, David Nečas
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.