FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 11-25-2011, 11:28 PM
Sebastian Pipping
 
Default 200MB waste from /usr/share/locale ?

Hello!


It seems that /usr/share/locale is keeping files for many languages not
of any use to me: around 200MB in total.

Is there a way to configure this away that I am not aware of?

Thanks in advance,



Sebastian
 
Old 11-25-2011, 11:36 PM
"Albert W. Hopkins"
 
Default 200MB waste from /usr/share/locale ?

On Sat, 2011-11-26 at 01:28 +0100, Sebastian Pipping wrote:
> It seems that /usr/share/locale is keeping files for many languages
> not
> of any use to me: around 200MB in total.
>
> Is there a way to configure this away that I am not aware of?
>
> Thanks in advance,

What do you have in LINGUAS and locales.conf? My /usr/share/locale is
only about 16MB on a GNOME desktop, 9MB on a base install and about 26MB
on a KDE VM (not that 200MB is really that big by today's standards).

-a
 
Old 11-26-2011, 12:44 AM
Florian Philipp
 
Default 200MB waste from /usr/share/locale ?

Am 26.11.2011 01:28, schrieb Sebastian Pipping:
> Hello!
>
>
> It seems that /usr/share/locale is keeping files for many languages not
> of any use to me: around 200MB in total.
>
> Is there a way to configure this away that I am not aware of?
>
> Thanks in advance,
>
>
>
> Sebastian
>

Please follow the section "glibc Locales" in the Gentoo handbook.
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap6

Regards,
Florian Philipp
 
Old 11-26-2011, 02:00 AM
Philip Webb
 
Default 200MB waste from /usr/share/locale ?

111126 Florian Philipp wrote:
> Am 26.11.2011 01:28, schrieb Sebastian Pipping:
>> It seems that /usr/share/locale is keeping files for many languages
>> not of any use to me: around 200MB in total.
>> Is there a way to configure this away that I am not aware of?
> Please follow the section "glibc Locales" in the Gentoo handbook.
> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap6

Yes, but that may not be the problem. I have just 2 locales requested,
but /etc/share/locale/ contains 90 MB of material.
A quick look suggests that most of it is in subdirs LC_MESSAGES ,
wh seem to come from emerges at various dates;
they are binary, so I don't know what they were reporting.
Even under /usr/share/locale/en_US , which should show my 2 locales,
there are only such messages. The locales do seem to work.

Can anyone explain what is going on ?

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
 
Old 11-26-2011, 05:32 AM
Mike Edenfield
 
Default 200MB waste from /usr/share/locale ?

On 11/25/2011 10:00 PM, Philip Webb wrote:

111126 Florian Philipp wrote:

Am 26.11.2011 01:28, schrieb Sebastian Pipping:

It seems that /usr/share/locale is keeping files for many languages
not of any use to me: around 200MB in total.
Is there a way to configure this away that I am not aware of?

Please follow the section "glibc Locales" in the Gentoo handbook.
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap6


Yes, but that may not be the problem. I have just 2 locales requested,
but /etc/share/locale/ contains 90 MB of material.
A quick look suggests that most of it is in subdirs LC_MESSAGES ,
wh seem to come from emerges at various dates;
they are binary, so I don't know what they were reporting.
Even under /usr/share/locale/en_US , which should show my 2 locales,
there are only such messages. The locales do seem to work.

Can anyone explain what is going on ?


Different packages include different levels of support for
filtering their installed localization messages, typically
one of "install everything", "install what's requested", or
"whats a locale?"


The reason you mostly have files under LC_MESSAGES is
because that's 99% of what is needed to localize a package.
The files in there are string resource packages,
translations of the strings used by the program, which are
picked up by the localization library (gettext)
automatically based on your locale settings. (coreutils
installs file into LC_TIME for locales with date/time
formatting requirements; I don't think I've ever seen any
other locale files.)


The standard way to inform a package which languages you
want is to set your LINGUAS variable in /etc/make.conf to
the locale name(s) you want installed (without the charset
specifier). LINGUAS works like any other portage expansion
variables: for those packages that support it, you get a set
of USE-flag-like language keywords set on build. (LINGUAS is
the well-known environment variable used by most
autotools-based packages to select languages, but portage
provides support above and beyond that.)


Unfortunately, proper locale support is spotty -- mostly due
to upstream maintainers being too lazy to properly add it to
their builds. Instead, the package will install every
message file it has available all the time.


You can safely delete any folders from /usr/share/locale for
locales that you don't have installed, since the normal
locale support in glibc will never ask for them. But they'll
just get put back next time you upgrade the package.


--Mike
 
Old 11-26-2011, 05:53 AM
 
Default 200MB waste from /usr/share/locale ?

Have you looked at localepurge?


-- Sent from my HP TouchPadOn Nov 25, 2011 7:00 PM, Philip Webb <purslow@ca.inter.net> wrote:
111126 Florian Philipp wrote:

> Am 26.11.2011 01:28, schrieb Sebastian Pipping:

>> It seems that /usr/share/locale is keeping files for many languages

>> not of any use to me: around 200MB in total.

>> Is there a way to configure this away that I am not aware of?

> Please follow the section "glibc Locales" in the Gentoo handbook.

> http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap6



Yes, but that may not be the problem. I have just 2 locales requested,

but /etc/share/locale/ contains 90 MB of material.

A quick look suggests that most of it is in subdirs LC_MESSAGES ,

wh seem to come from emerges at various dates;

they are binary, so I don't know what they were reporting.

Even under /usr/share/locale/en_US , which should show my 2 locales,

there are only such messages. The locales do seem to work.



Can anyone explain what is going on ?



--

========================,,======================== ====================

SUPPORT ___________//___, Philip Webb

ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto

TRANSIT `-O----------O---' purslowatchassdotutorontodotca
 
Old 11-26-2011, 04:23 PM
walt
 
Default 200MB waste from /usr/share/locale ?

On 11/25/2011 04:28 PM, Sebastian Pipping wrote:

Hello!


It seems that /usr/share/locale is keeping files for many languages not
of any use to me: around 200MB in total.

Is there a way to configure this away that I am not aware of?


There was a thread a few months ago about this problem. Apparently
quite a few packages ignore any LC settings and just install all of
their *.mo files every time.

Someone recommended app-admin/localepurge, which removes them after
installation. Reclaims hundreds of MB when I run it every month or
so.
 
Old 11-26-2011, 07:42 PM
Philip Webb
 
Default 200MB waste from /usr/share/locale ?

111126 walt wrote:
> Someone recommended app-admin/localepurge,
> which removes them after installation.
> Reclaims hundreds of MB when I run it every month or so.

Thanks & to the other who suggested it. It has removed 82 MB junk.
As its man page says, hopefully one day it wb in Portage ...

--
========================,,======================== ====================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
 
Old 11-27-2011, 05:10 PM
Sebastian Pipping
 
Default 200MB waste from /usr/share/locale ?

On 11/26/2011 07:32 AM, Mike Edenfield wrote:
>> Can anyone explain what is going on ?
>
> Different packages include different levels of support for filtering
> their installed localization messages, typically one of "install
> everything", "install what's requested", or "whats a locale?"
>
> The reason you mostly have files under LC_MESSAGES is because that's 99%
> of what is needed to localize a package. The files in there are string
> resource packages, translations of the strings used by the program,
> which are picked up by the localization library (gettext) automatically
> based on your locale settings. (coreutils installs file into LC_TIME for
> locales with date/time formatting requirements; I don't think I've ever
> seen any other locale files.)
>
> The standard way to inform a package which languages you want is to set
> your LINGUAS variable in /etc/make.conf to the locale name(s) you want
> installed (without the charset specifier). LINGUAS works like any other
> portage expansion variables: for those packages that support it, you get
> a set of USE-flag-like language keywords set on build. (LINGUAS is the
> well-known environment variable used by most autotools-based packages to
> select languages, but portage provides support above and beyond that.)
>
> Unfortunately, proper locale support is spotty -- mostly due to upstream
> maintainers being too lazy to properly add it to their builds. Instead,
> the package will install every message file it has available all the time.
>
> You can safely delete any folders from /usr/share/locale for locales
> that you don't have installed, since the normal locale support in glibc
> will never ask for them. But they'll just get put back next time you
> upgrade the package.
>
> --Mike

Excellent description -- thank you!

In case I find time to blog about this on Planet Gentoo:
would you allow using the above text under some Creative Commons
license, say CC-BY-SA/3.0? Do you have a personal website or blog that
I could add a link to?

Best,




Sebastian
 
Old 11-27-2011, 05:15 PM
Sebastian Pipping
 
Default 200MB waste from /usr/share/locale ?

On 11/26/2011 01:36 AM, Albert W. Hopkins wrote:
> (not that 200MB is really that big by today's standards).

In my case it is. I am caching all of /usr/share/ into a cache working
on file system level with space limited to 1GB taken from RAM. It's an
experiment and it doesn't seem to perform very well, so you don't really
miss anything, though.

Best,



Sebastian
 

Thread Tools




All times are GMT. The time now is 10:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org