Hi, Am Montag, den 20.07.2009, 17:56 +0200 schrieb Joachim Breitner: > I was under the impression that locales-all’s purpose is to be installed > on machines too weak to compile the locales tables themselves. > Nevertheless, the postinst for locales-all extracts a large armound of > data to /tmp (which these days, especially on mobilde devices, often is > a tmpfs) calls localedef. > > (I admit I can’t check which one is causing more problems, because the > device does not react at the moment). > > Would it be possible to have locales-all completely static? Or maybe > otherwise reduce the workload to be done at postinst time? ok, it is the extracting that’s the issue here, the localedef call is not fast, but does not exceed any resources. So, can’t locales-all just ship /usr/lib/locale/locale-archive completely? Alternatively, the load on /tmp could be reduced considerably by something like this in postinst (untested pseudocode): if [ "$1" = "configure" ]; then [ -d /usr/lib/locale ] || mkdir /usr/lib/locale # Remove existing locales, otherwise localedef does not # overwrite them and exits with a non-null value rm -f /usr/lib/locale/locale-archive 2>/dev/null || true tmpdir=$(mktemp -d -t locales.XXXXXXXXXX) trap 'rm -rf "$tmpdir" > /dev/null 2>&1' exit for locale in list of locales filled here at compile time do tar --use-compress-program /usr/bin/lzma -xf /usr/lib/locales-all/supported.tar.lzma -C "$tmpdir" ./$locale localedef --quiet --add-to-archive "$tmpdir"/$locale rm -rf "$tmpdir"/$locale done fi (list of locales could also be read by tar --use-compress-program /usr/bin/lzma -t -f /usr/lib/locales-all/supported.tar.lzma | cut -d/ -f2|uniq if putting it there at package compile time is troublesome). Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil