From 0bebd30fdadda0f8e9eadba21972ed583146ebb1 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 27 Oct 2008 00:51:20 +0100 Subject: [PATCH] Rework locale handling --- debian/changelog | 7 ++++++- docs/grml-live.txt | 4 +++- etc/grml/fai/config/scripts/GRMLBASE/25-locales | 23 ++++++++++++++++++----- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index dab4ac8..c88c30c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,13 @@ grml-live (0.9.6) unstable; urgency=low * Add espeakup to GRML_FULL. * Execute dpkg-reconfigure for localepurge with noninteractive frontend. [Closes: issue554] + * Rework locale handling. From now on /usr/share/locale gets removed + by default (though /usr/share/i18n/locales won't be touched for + now), unless using class LOCALES. Reason: We have >70MB inside + /usr/share/locale on GRML_FULL, just too much to ship by default, + * Remove localepurge from GRML_SMALL. - -- Michael Prokop Sun, 26 Oct 2008 01:13:39 +0200 + -- Michael Prokop Mon, 27 Oct 2008 00:50:44 +0100 grml-live (0.9.5) unstable; urgency=low diff --git a/docs/grml-live.txt b/docs/grml-live.txt index ca7adc5..f3173b7 100644 --- a/docs/grml-live.txt +++ b/docs/grml-live.txt @@ -266,7 +266,9 @@ progress) * LATEX_CLEANUP: get rid of several very large LaTeX directories (like some /usr/share/doc/texlive-*, /usr/share/doc/texmf,...) -* LOCALES: use full featured locales setup (see /etc/locale.gen.grml) +* LOCALES: use full featured locales setup (see /etc/locale.gen.grml). This +avoids to get rid of /usr/share/locale - which happens by default otherwise - as +well. * NO_ONLINE: do not run scripts during the chroot build process which require a network connection diff --git a/etc/grml/fai/config/scripts/GRMLBASE/25-locales b/etc/grml/fai/config/scripts/GRMLBASE/25-locales index b47a5e5..c6c4390 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/25-locales +++ b/etc/grml/fai/config/scripts/GRMLBASE/25-locales @@ -8,11 +8,9 @@ set -e -# make sure: -# localepurge localepurge/nopurge multiselect .... -# is set so localepurge works as expected -if [ -x $target/usr/sbin/localepurge ] ; then - $ROOTCMD dpkg-reconfigure -f noninteractive localepurge +if [ -z "$ROOTCMD" ] ; then + echo "variable \$ROOTCMD not set, exiting to avoid any possible damage">&2 + exit 1 fi # use full locales setup only in classes GRML_FULL and LOCALES @@ -24,6 +22,13 @@ else cp $target/etc/locale.gen.minimal $target/etc/locale.gen fi +# make sure: +# localepurge localepurge/nopurge multiselect .... +# is set so localepurge works as expected +if [ -x $target/usr/sbin/localepurge ] ; then + $ROOTCMD dpkg-reconfigure -f noninteractive localepurge +fi + if [ -x $target/usr/sbin/locale-gen ] ; then $ROOTCMD locale-gen else @@ -34,5 +39,13 @@ if [ -x $target/usr/sbin/localepurge ] ; then $ROOTCMD localepurge fi +# get rid of LC_MESSAGES unless using class LOCALES +if ! ifclass LOCALES ; then + echo 'Removing /usr/share/locale' + $ROOTCMD rm -rf /usr/share/locale + $ROOTCMD mkdir /usr/share/locale + # TODO: /usr/share/i18n/locales +fi + ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3 -- 2.1.4