Portage has good integration with some applications, for example prelink. I'd like to see localepurge(8) integrated in a similar manner. On my Debian systems, if I have localepurge installed, it is run at the end of each install: Unpacking fetchmail (from .../fetchmail_6.3.6-1etch1_arm.deb) ... Setting up fetchmail (6.3.6-1etch1) ... localepurge: Disk space freed in /usr/share/locale: 812K I think that if localepurge is installed and enabled (NEEDSCONFIGFIRST commented in /etc/locale.nopurge) it is reasonable to assume it would be ok to run it automatically at the end of each emerge run. Apologies for not attaching a sample patch; Python is not my strong point.
Uhm, use a post_src_install hook in /etc/portage/bashrc if you want this. Integrating a hack around broken packages that fails to respect LINGUAS to portage is not a proper solution for sure. :)
Since I don't see a reason to merge the files only to purge them later, it seems to me that this type of functionality should really hook in somewhere before the merge phase, similar to how INSTALL_MASK works. That way we will have one less thing that needs superuser privileges to interact with the live filesystem. I just ran localepurge on my desktop system, telling it to keep only en and en_US, and it freed 228668K of disk space! :)
(In reply to comment #1) > Integrating a hack around broken packages that fails to respect LINGUAS to > portage is not a proper solution for sure. :) Hmm, maybe we can detect this and turn in into QA Notice that's logged via elog. That should make it easier to get these things fixed.
See comment #1