Save diskspace by recompiling glibc
The idea is to keep the number of installed locales to the bare minimum.
Ever since sys-libs/glibc-220.127.116.1140619-r2 has been in Portage, a USE-flag called userlocales was provided to make sure only those locales mentioned in /etc/locales.build are to be built and installed. As a side-effect, this also leads to a much faster emerge of glibc.
Code: Activate the userlocales USE flag especially for glibc
# echo 'sys-libs/glibc userlocales' >> /etc/portage/package.use
Now specify the locales you want to be able to use:
# nano -w /etc/locales.build
only add the locales you need, like this:
All those locales supported by glibc can be viewed by unpacking the source, the file is /var/tmp/portage/glibc-......../work/glibc-........../localedata/SUPPORTED.
(Note: If this is the first time you compile glibc, skip the following steps).
Now let's start compiling glibc:
# emerge -B glibc
Then use localepurge script to delete all the locale files (you need to emerge localepurge and configure /etc/locale.nopurge first):
Finally, install the newly compiled glibc:
# emerge -k glibc