diff options
Diffstat (limited to 'abs/core-testing/glibc/glibc.install')
-rw-r--r-- | abs/core-testing/glibc/glibc.install | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/abs/core-testing/glibc/glibc.install b/abs/core-testing/glibc/glibc.install index 2a35040..2ed1127 100644 --- a/abs/core-testing/glibc/glibc.install +++ b/abs/core-testing/glibc/glibc.install @@ -1,3 +1,7 @@ +infodir=/usr/share/info +filelist=(libc.info libc.info-1 libc.info-2 libc.info-3 libc.info-4 libc.info-5 libc.info-6 libc.info-7 + libc.info-8 libc.info-9 libc.info-10 libc.info-11) + pre_upgrade() { if [ "`uname -m`" = "x86_64" ]; then if [ "`vercmp $2 2.4`" -lt 0 ]; then @@ -29,15 +33,18 @@ mv /lib64 /lib && echo "/lib64 moved" fi fi -} + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done +} post_upgrade() { - echo -n "reloading init: " ldconfig -r . init u - echo "done." - cat << _EOF + + if [ "`vercmp $2 2.3.6`" -lt 0 ]; then + cat << _EOF ==> ATTENTION INTERNATIONAL USERS: ==> ==> Locales are no longer included in the glibc package. @@ -46,21 +53,20 @@ post_upgrade() { ==> glibc will try to autodetect the required locales now, if you need ==> additional locales, please enable them in /etc/locale.gen and run ==> /usr/sbin/locale-gen - ==> - ==> Check /etc/locale.gen.pacnew for new supported locales ==> _EOF - # Check active locales, enable the ones that are in use - loc=("$LANG" - "`grep '^LOCALE=' etc/rc.conf | awk -F '=' '{ print $2 }'`") - for l in "${loc[@]}"; do - if [ ! -z "${l}" ]; then - line="`grep -i "^#${l}[[:space:]]" etc/locale.gen`" - if [ ! -z "${line}" ]; then - sed -i -e "s|${line}|${line/\#/}|" etc/locale.gen + # Check active locales, enable the ones that are in use + loc=("$LANG" + "`grep '^LOCALE=' etc/rc.conf | awk -F '=' '{ print $2 }'`") + for l in "${loc[@]}"; do + if [ ! -z "${l}" ]; then + line="`grep -i "^#${l}[[:space:]]" etc/locale.gen`" + if [ ! -z "${line}" ]; then + sed -i -e "s|${line}|${line/\#/}|" etc/locale.gen + fi fi - fi - done + done + fi usr/sbin/locale-gen @@ -115,8 +121,13 @@ if [ "`uname -m`" = "x86_64" ]; then fi fi + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done } -op=$1 -shift -$op $* +pre_remove() { + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} |