Bug 1000162 - [RFE] Make build-locale-archive report unowned locale directories
Summary: [RFE] Make build-locale-archive report unowned locale directories
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Carlos O'Donell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 960815 1001409 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-22 20:26 UTC by Mark Wielaard
Modified: 2017-07-14 01:49 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 02:04:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2013-08-22 20:26:20 UTC
I was just upgrading my f19 box and saw:
  Updating   : glibc-common-2.17-13.fc19.x86_64                           2/112 
/usr/sbin/build-locale-archive: incomplete set of locale files in "/usr/lib/locale/zh_HK"
/usr/sbin/build-locale-archive: incomplete set of locale files in "/usr/lib/locale/pt_BR"
/usr/sbin/build-locale-archive: incomplete set of locale files in "/usr/lib/locale/zh_TW"
/usr/sbin/build-locale-archive: incomplete set of locale files in "/usr/lib/locale/en_GB"
/usr/sbin/build-locale-archive: incomplete set of locale files in "/usr/lib/locale/zh_CN"
/usr/sbin/build-locale-archive: incomplete set of locale files in "/usr/lib/locale/en_CA"

After looking around I finally found the problem described in the comments of this old bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=650023

Apparently an (old) package had left some directories behind.
In my case the package was already gone:
rpm -qf /usr/lib/locale/en_CA
file /usr/lib/locale/en_CA is not owned by any package

It might be a nice enhancement if on an error like the above build-locale-archive would check if it actually owned the directory and if not tell which package did or if the package is gone to just silently clean up.

Comment 1 Carlos O'Donell 2013-09-09 19:29:28 UTC
I agree it would be a good enhancement.

Comment 2 Carlos O'Donell 2013-09-09 19:30:31 UTC
Given that build-locale-archive is Fedora specific we can actually query the RPM database to see who owns those directories and if it's not us we can ignore them or cleanup or issue a better warning.

Comment 3 Carlos O'Donell 2013-09-09 19:32:07 UTC
*** Bug 960815 has been marked as a duplicate of this bug. ***

Comment 4 Carlos O'Donell 2013-09-09 19:32:10 UTC
*** Bug 1001409 has been marked as a duplicate of this bug. ***

Comment 5 Steve 2014-08-05 01:46:16 UTC
output of query of ownership shows none of the directories are owned by a package

# cd  /usr/lib/locale/; for i in `ls `; do rpm -qf $i ; done
file /usr/lib/locale/am is not owned by any package
file /usr/lib/locale/ar is not owned by any package
file /usr/lib/locale/ast is not owned by any package
file /usr/lib/locale/az is not owned by any package
file /usr/lib/locale/bg is not owned by any package
file /usr/lib/locale/ca is not owned by any package
file /usr/lib/locale/ca@valencia is not owned by any package
file /usr/lib/locale/cs is not owned by any package
file /usr/lib/locale/da is not owned by any package
file /usr/lib/locale/de is not owned by any package
file /usr/lib/locale/dz is not owned by any package
file /usr/lib/locale/el is not owned by any package
file /usr/lib/locale/en_CA is not owned by any package
file /usr/lib/locale/en_GB is not owned by any package
file /usr/lib/locale/eo is not owned by any package
file /usr/lib/locale/es is not owned by any package
file /usr/lib/locale/et is not owned by any package
file /usr/lib/locale/eu is not owned by any package
file /usr/lib/locale/fi is not owned by any package
file /usr/lib/locale/fr is not owned by any package
file /usr/lib/locale/ga is not owned by any package
file /usr/lib/locale/gl is not owned by any package
file /usr/lib/locale/gu is not owned by any package
file /usr/lib/locale/he is not owned by any package
file /usr/lib/locale/hr is not owned by any package
file /usr/lib/locale/hu is not owned by any package
file /usr/lib/locale/id is not owned by any package
file /usr/lib/locale/it is not owned by any package
file /usr/lib/locale/ja is not owned by any package
file /usr/lib/locale/kk is not owned by any package
file /usr/lib/locale/ko is not owned by any package
glibc-common-2.18-12.fc20.i686
glibc-common-2.18-12.fc20.i686
file /usr/lib/locale/lt is not owned by any package
file /usr/lib/locale/lv is not owned by any package
file /usr/lib/locale/mk is not owned by any package
file /usr/lib/locale/ml is not owned by any package
file /usr/lib/locale/mr is not owned by any package
file /usr/lib/locale/ms is not owned by any package
file /usr/lib/locale/nb is not owned by any package
file /usr/lib/locale/ne is not owned by any package
file /usr/lib/locale/nl is not owned by any package
file /usr/lib/locale/nn is not owned by any package
file /usr/lib/locale/oc is not owned by any package
file /usr/lib/locale/pl is not owned by any package
file /usr/lib/locale/pt is not owned by any package
file /usr/lib/locale/pt_BR is not owned by any package
file /usr/lib/locale/ro is not owned by any package
file /usr/lib/locale/ru is not owned by any package
file /usr/lib/locale/rw is not owned by any package
file /usr/lib/locale/sk is not owned by any package
file /usr/lib/locale/sl is not owned by any package
file /usr/lib/locale/sr is not owned by any package
file /usr/lib/locale/sr@latin is not owned by any package
file /usr/lib/locale/sv is not owned by any package
file /usr/lib/locale/ta is not owned by any package
file /usr/lib/locale/te is not owned by any package
file /usr/lib/locale/tr is not owned by any package
file /usr/lib/locale/uk is not owned by any package
file /usr/lib/locale/vi is not owned by any package
file /usr/lib/locale/zh_CN is not owned by any package
file /usr/lib/locale/zh_HK is not owned by any package
file /usr/lib/locale/zh_TW is not owned by any package

Comment 6 Zbigniew Jędrzejewski-Szmek 2015-11-19 02:04:35 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=650023#c10 says that this is a packaging error: *.mo files belong in /usr/share/locale, not /usr/lib/locale. It does not seem to make much sense to work-around packaging errors in a low-level tool like glibc. I'll close this because offending packages were fixed in the F14-15 timeframe and this does not seem to be a problem anymore.

Comment 7 Henrique Martins 2017-07-13 12:38:27 UTC
Maybe not a problem anymore, but it just happened to me today 2017/07/13, on the cleanup phase of glibc-2.24-8.fc25.x86_64.

glibc packages upgraded in today's dnf update:
  glibc.i686 2.24-9.fc25
  glibc.x86_64 2.24-9.fc25
  glibc-all-langpacks.x86_64 2.24-9.fc25
  glibc-common.x86_64 2.24-9.fc25
  glibc-devel.x86_64 2.24-9.fc25
  glibc-headers.x86_64 2.24-9.fc25
  glibc-utils.x86_64 2.24-9.fc25

Comment 8 Henrique Martins 2017-07-13 12:51:29 UTC
Probably because I had a lot of virtually empty directories in /usr/lib/locale, created on 2013/03/27 (some update to Fedora 18?). These directories do not exist on another system that may have been first installed past that Fedora version.

Removed all but C.utf8 directory and the locale-archive and locale-archive.tmpl files, which were created or updated by the update that gave the warnings.


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