Ticket #159 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Enhance find_lang.sh to search in more places for locale files

Reported by: spot Assigned to: RpmTickets
Priority: major Milestone:
Component: rpm Version: RPM Development
Keywords: Cc:

Description

A bug was opened against the Fedora Django package, because it had .mo locale files, but they were not being found by %find_lang. After some discussion, it was discovered that this was because these files lived in %{python_sitelib}/django/conf/locale/$LOCALE/django.mo. Because %{python_sitelib} is not under /usr/share, find_lang.sh couldn't find them.

Till Mass wrote this patch, which alters the search path for find_lang.sh to not be restricted to /usr/share.

The original bugreport is at: https://bugzilla.redhat.com/show_bug.cgi?id=584866 Till's patch posting is here: https://bugzilla.redhat.com/attachment.cgi?id=415111

A copy of his patch is attached, please review for commit.

Attachments

find-lang-support-all-locale-dirs.patch (0.9 kB) - added by spot on 05/19/10 14:19:27.
support all locale dirs, not just those under share/

Change History

05/19/10 14:19:27 changed by spot

  • attachment find-lang-support-all-locale-dirs.patch added.

support all locale dirs, not just those under share/

05/20/10 09:13:09 changed by pmatilai

  • status changed from new to closed.
  • resolution set to fixed.

Seems reasonable. Applied (and credited to Till Maas), thanks for pointing me to the patch.

Beyond the scope of this bug, just thinking out loud so I've a better chance of remembering it: finding and marking the locale files could (and should) be automated far beyond what's done now. Rpm already classifies all files in packages with content + path based configurable rules, instead of painfully composing file manifests in find-lang.sh, the file classifier (currently only used for dependency extraction) could do the job just as well and better, without requiring dumb extra work in spec.