OSSP CVS Repository

ossp - Check-in [5185]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5185
Date: 2005-Oct-02 16:17:58 (local)
2005-Oct-02 14:17:58 (UTC)
User:rse
Branch:
Comment: Use "env -i sort" for Linux detections in "shtool platform" to circumvent LC_COLLATE and LANG environment problems.
Tickets:
Inspections:
Files:
ossp-pkg/shtool/ChangeLog      1.215 -> 1.216     4 inserted, 0 deleted
ossp-pkg/shtool/sh.platform      1.13 -> 1.14     12 inserted, 12 deleted

ossp-pkg/shtool/ChangeLog 1.215 -> 1.216

--- ChangeLog    2005/08/31 07:24:56     1.215
+++ ChangeLog    2005/10/02 14:17:58     1.216
@@ -11,6 +11,10 @@
 
  Changes between 2.0.2 and 2.0.3 (15-Jun-2005 to xx-XXX-2005):
 
+   *) Use "env -i sort" for Linux detections in "shtool platform" 
+      to circumvent LC_COLLATE and LANG environment problems.
+      [Ralf S. Engelschall]
+
    *) Fixed "shtool version -l perl" by replacing "my" with "our"
       to allow the generated file to be really useful when loaded
       with the Perl "require" directive.


ossp-pkg/shtool/sh.platform 1.13 -> 1.14

--- sh.platform  2005/07/05 19:05:40     1.13
+++ sh.platform  2005/10/02 14:17:58     1.14
@@ -201,7 +201,7 @@
         v_kern=`echo "${UNAME_RELEASE}" |\
             sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/'`
         v_libc=`(strings /lib/libc.so.* | grep '^GLIBC_' | sed -e 's/^GLIBC_//' |\
-            sort -n | sed -n -e '$p' | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/') 2>/dev/null`
+            env -i sort -n | sed -n -e '$p' | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/') 2>/dev/null`
         ST="GNU/<Linux >${v_libc}/<${v_kern}>"
         if [ -f /etc/lsb-release ]; then
             eval `( . /etc/lsb-release
@@ -214,7 +214,7 @@
         if [ ".$SP" = . ]; then
             for tagfile in x \
                 `cd /etc && \
-                /bin/ls *[_-]release *[_-]version 2>/dev/null | sort | \
+                /bin/ls *[_-]release *[_-]version 2>/dev/null | env -i sort | \
                 sed -e '/^redhat-release$/d' -e '/^lsb-release$/d'; \
                 echo redhat-release lsb-release`
             do
@@ -235,16 +235,16 @@
                             n="<R>ed <H>at <L>inux"
                         fi
                         ;;
-                    debian            ) n="Debian[ GNU/Linux]"        ;;
-                    ubuntu            ) n="Ubuntu[ GNU/Linux]"        ;;
-                    fedora            ) n="<Fedora> Core[ GNU/Linux]" ;;
-                    suse              ) n="SuSE[ Linux]"              ;;
-                    mandrake|mandriva ) n="Mandriva[ Linux]"          ;;
-                    gentoo            ) n="Gentoo[ GNU/Linux]"        ;;
-                    slackware         ) n="Slackware[ Linux]"         ;;
-                    turbolinux        ) n="TurboLinux"                ;;
-                    unitedlinux       ) n="UnitedLinux"               ;;
-                    *                 ) n="${n}[ GNU/Linux]"          ;;
+                    debian             ) n="Debian[ GNU/Linux]"        ;;
+                    ubuntu             ) n="Ubuntu[ GNU/Linux]"        ;;
+                    fedora             ) n="<Fedora> Core[ GNU/Linux]" ;;
+                    suse               ) n="SuSE[ Linux]"              ;;
+                    mandrake*|mandriva ) n="Mandriva[ Linux]"          ;;
+                    gentoo             ) n="Gentoo[ GNU/Linux]"        ;;
+                    slackware          ) n="Slackware[ Linux]"         ;;
+                    turbolinux         ) n="TurboLinux"                ;;
+                    unitedlinux        ) n="UnitedLinux"               ;;
+                    *                  ) n="${n}[ GNU/Linux]"          ;;
                 esac
                 case "$n" in
                     *"<"*">"* ) SP="$n <$v>" ;;

CVSTrac 2.0.1