[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ITA freedict



[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.



Reply to: