I found a debian package called localepurge. It is similar to docpurge (which maemo already includes) in that it runs after each package installation. What it does is delete unwanted locale data that packages might have installed, such as the 4MB worth of german/french/spanish dialog included with freeciv (random example, sorry for english bias).
Installing it proved somewhat difficult. It depends on ucf, which is available for debian-all but not maemo specifically. It also depends on locales. It, and these, depend on debianutils and coreutils, which we cant have because of busybox. Some massaging with dpkg --force was required to get everything to install properly. ucf and locales arent required after localepurge has finished configuring, so I uninstalled them rather than have apt whining about broken dependencies forever.
Once it is installed and configured (with a list of locales you want to keep) then it still refuses to run :( Two problems and solutions are as follows:
It wants grep -x, which busybox grep is lacking. I had to install pcregrep and edit the localepurge script to call that (or I could have diverted busybox grep and replaced it with a link to pcregrep). There may also be a solution using the existing busybox grep, if someone with stronger grep-fu cares to figure that out.
It wants rm -v, which is silly. I removed the -v from the script and prepended an echo to output what file was being removed.
All of that took a couple of hours to figure out, but probably only 10-15 minutes to reproduce from these instructions... and now I find myself 3MB closer to a light base system, with confidence that I won't be burdened by unwanted locale data in the future.
Hope this helps someone out.
PS: If anyone can figure out how to strip locales from /usr/lib/locales/locale-archive, that could save another .5MB or so. Not worth more than the hour I wasted on that already, but worth a solution if anyone wants to reply or PM with one.
Installing it proved somewhat difficult. It depends on ucf, which is available for debian-all but not maemo specifically. It also depends on locales. It, and these, depend on debianutils and coreutils, which we cant have because of busybox. Some massaging with dpkg --force was required to get everything to install properly. ucf and locales arent required after localepurge has finished configuring, so I uninstalled them rather than have apt whining about broken dependencies forever.
Once it is installed and configured (with a list of locales you want to keep) then it still refuses to run :( Two problems and solutions are as follows:
It wants grep -x, which busybox grep is lacking. I had to install pcregrep and edit the localepurge script to call that (or I could have diverted busybox grep and replaced it with a link to pcregrep). There may also be a solution using the existing busybox grep, if someone with stronger grep-fu cares to figure that out.
It wants rm -v, which is silly. I removed the -v from the script and prepended an echo to output what file was being removed.
All of that took a couple of hours to figure out, but probably only 10-15 minutes to reproduce from these instructions... and now I find myself 3MB closer to a light base system, with confidence that I won't be burdened by unwanted locale data in the future.
Hope this helps someone out.
PS: If anyone can figure out how to strip locales from /usr/lib/locales/locale-archive, that could save another .5MB or so. Not worth more than the hour I wasted on that already, but worth a solution if anyone wants to reply or PM with one.