On Sun, Aug 24, 2003 at 12:41:24AM +0200, Petter Reinholdtsen wrote: > [Bob Hilliard] > > This presents a problem for the dict-freedict package, in that a > > xx_YY.utf-8 locale must be available on the build machine. AFAIK > > there is no way to guarantee that a specific locale is available on > > the buildds. It would be possible for debian/rules to generate a > > xx_YY.utf-8 locale, but this would require rules to run as root, > > which is not permissible by policy. > Another idea, which I will contribute to the boot-floppies developers > and Martin Sjรถgren, is to generate the locales you need, and then set > LOCPATH to pointto its location. > If you set LOCPATH to the equivalent of /usr/lib/locale, and LC_ALL to > the name of the locale you generate, you should get what you want > without being root. Something like this (mostly cut-n-paste from d-i > build system): > # The variables > LOCALE_PATH=/tmp/usr/lib/locale > LOCALE_NAME=en_IN > LOCALE_CHARSET=UTF-8 > # Generating the locale > mkdir -p $LOCALE_PATH > localedef -i "$LOCALE_NAME.$LOCALE_CHARSET" -f "$LOCALE_CHARSET" \ > "$LOCALE_PATH/$LOCALE_NAME.$LOCALE_CHARSET" > # Using the locale > LOCPATH=$LOCALE_PATH LC_ALL=$LOCALE_NAME.$LOCALE_CHARSET date > This should work just fine as any user. Looks like this needs to be localedef -i "$LOCALE_NAME" -f "$LOCALE_CHARSET" instead, but otherwise, I've confirmed that this works. Cheers, -- Steve Langasek postmodern programmer
Attachment:
pgp9PVMd6Atg3.pgp
Description: PGP signature