Active Topics

 


Reply
Thread Tools
Posts: 152 | Thanked: 58 times | Joined on Oct 2010 @ void
#1
The localepurge package in debian can free a consideration amount of space by removing unused locales in applications. It should be a big space saver of the rootfs in n900's Maemo5.
I've searched the forums and only came up with this short post: http://talk.maemo.org/showthread.php...ht=localepurge
All other discussion mainly deals with Diablo/OS2008.
Would there be a localepurge package for n900/Maemo5?
Has anyone worked on it?
I've been thinking of setting up a native compilation environment on my n900, but what bugs me is shortage of space to cater for the chunky SDK & tools in the rootfs. :P
Any idea?
 
Posts: 152 | Thanked: 58 times | Joined on Oct 2010 @ void
#2
At last I managed to purge the unused locales from the rootfs.

Since there is no localepurge package for maemo 5, I just grabbed "localepurge" and from the armel package from debian and copy the files manually to /usr/sbin. There is a version 0.5.8 for Diablo. I just used the latest 0.6.2 from debian squeeze. I didn't want to move locales to /opt as I would have to do it for every app installation. Instead of cooking up my own script, using localepurge seems to me a better and safer solution.
Anyway, after some tries I found that both UTF-8 and ISO-8895-1 are necessary. I chose the easy way:
1. Run "dpkg-reconfigure locales" & select "en_US.UTF-8 UTF-8" AND "en_US ISO-8895-1".
2. Run "locale-gen" once to generate the needed locales.
3. Run "dpkg-reconfigure localepurge" and select only those to keep. Choosing high verbosity will give you more options of how locales are purged, such as whether to purge man pages and show how much space is saved, etc..
4. Run "localepurge" to remove all the unnecessary locales. In my case around 20MB of rootfs space is reclaimed.
Reboot to test the result. No more gibberish.

The hard way:
Edit /etc/locale.gen and /etc/locale.nopurge. Note the difference in how locales are specified. For example, for US English locales,

in /etc/locale.gen, it should be something like:
en_US ISO-88951
en_US.UTF-8 UTF-8

while in /etc/locale.nopurge, it should be
en_US
en_US.UTF-8

You can also configure localepurge easily by simply (un)commenting the options in the file.
__________________
My N900: rootfs = 27GB entirely on eMMC, MyDocs = 2GB, 8GB class 6 uSD, running kernel-power v42, evopedia with 10GB English dump, native non-SDK compiler.
 

The Following 2 Users Say Thank You to 009N For This Useful Post:
Posts: 34 | Thanked: 15 times | Joined on Jan 2010
#3
You can of course generate file /etc/locale.gen with the locales you want and invoke locale-gen to regenerate locales, that will stript your /usr/lib/locale/locale-archive file from 23mb to 1 or 2mb, thats ok.

But I've been looking localepurge.config file at localepurge_0.6.2 (debian sid one) source and i can see that for dpkg-reconfigure and db_* calls used by localepurge you need debconf package witch conflicts with fakedebconf and mp-fremantle-generic-pr packages...

How did u did it?
 
Posts: 34 | Thanked: 15 times | Joined on Jan 2010
#4
Ok, so finaly i used the diablo's repository localepurge package, after installing few dependencies and creating one symbolic link it worked like a charm.
NOTE: Ensure you have generated /etc/locale.nopurge before proceding

localepurge: Disk space freed in /usr/share/locale: 16576K

So regenerating /usr/lib/locale/locale-archive and running localepurge striped my rootfs almost 40 Mb
 

The Following User Says Thank You to pinoverclock For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:14.