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

r3166 - in glibc-package/branches/glibc-2.8/debian: . debhelper.in



Author: aurel32
Date: 2008-10-13 16:28:44 +0000 (Mon, 13 Oct 2008)
New Revision: 3166

Modified:
   glibc-package/branches/glibc-2.8/debian/changelog
   glibc-package/branches/glibc-2.8/debian/debhelper.in/locales.postinst
Log:
Merge changes from trunk (up to revision 3165)


Modified: glibc-package/branches/glibc-2.8/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.8/debian/changelog	2008-10-13 15:45:04 UTC (rev 3165)
+++ glibc-package/branches/glibc-2.8/debian/changelog	2008-10-13 16:28:44 UTC (rev 3166)
@@ -138,7 +138,7 @@
   * add any/local-linuxthreads-ptw.diff. Closes: #494908.
   * add kfreebsd/local-sysdeps28.diff, glibc 2.8 specific kfreebsd sysdeps.
 
- -- Aurelien Jarno <aurel32@debian.org>  Sun, 12 Oct 2008 22:26:06 +0200
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 13 Oct 2008 18:28:11 +0200
 
 glibc (2.7-15) unstable; urgency=low
 

Modified: glibc-package/branches/glibc-2.8/debian/debhelper.in/locales.postinst
===================================================================
--- glibc-package/branches/glibc-2.8/debian/debhelper.in/locales.postinst	2008-10-13 15:45:04 UTC (rev 3165)
+++ glibc-package/branches/glibc-2.8/debian/debhelper.in/locales.postinst	2008-10-13 16:28:44 UTC (rev 3166)
@@ -14,8 +14,6 @@
     . /usr/share/debconf/confmodule
     db_version 2.0
 
-    SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED /usr/local/share/i18n/SUPPORTED | sort -u)"
-
     db_get locales/default_environment_locale && DEFAULT_ENVIRONMENT="$RET"
     db_get locales/locales_to_be_generated && SELECTED_LOCALES=$RET
     SELECTED_LOCALES="$(echo $SELECTED_LOCALES | sed -e 's/, /\n/g')"
@@ -37,18 +35,25 @@
         fi
 
         # Comment previous defined locales
-        sed -i -e 's/^[a-zA-Z]/# &/' $LG
+        sed -i -e 's/^ *[a-zA-Z]/# &/' $LG
 
-        # Make sure all locales exists in locales.gen
+        # Get list of supported locales
+        if [ -f "/usr/local/share/i18n/SUPPORTED" ] ; then
+            SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED /usr/local/share/i18n/SUPPORTED | sort -u)"
+        else
+            SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED | sort -u)"
+        fi
+
+        # Make sure all locales exist in locales.gen
         echo "$SUPPORTED_LOCALES" | while read locale ; do
-           if ! grep -q "^# *$locale *\$" $LG; then 
+           if ! grep -q "^[# ]*$locale *\$" $LG; then 
              echo "# $locale" >> $LG
            fi
         done
 
         # Uncomment selected locales
         echo "$SELECTED_LOCALES" | while read locale ; do
-            sed -i -e "s/# *$locale *$/$locale/" $LG
+            sed -i -e "s/^[# ]*$locale *$/$locale/" $LG
         done
     fi
 


Reply to: