lsb 3.2-18 Debian release.
authorChris Lawrence <lawrencc@debian.org>
Mon, 4 Aug 2008 07:31:03 +0000 (02:31 -0500)
committerDidier Raboud <odyx@debian.org>
Mon, 4 Aug 2008 07:31:03 +0000 (02:31 -0500)
debian/changelog
init-functions
test/lsb-test.sh [new file with mode: 0644]

index 45e8042238cc8df29d4d021b4463cf838d8f9155..d4d65d1462b0e6e161b6c2796a98163e99ca46be 100644 (file)
@@ -1,3 +1,9 @@
+lsb (3.2-18) unstable; urgency=low
+
+  * Also fix case where stdout isn't color-capable.  (Closes: #493505, again)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 04 Aug 2008 02:31:03 -0500
+
 lsb (3.2-17) unstable; urgency=low
 
   * log_{success,failure,warning}_msg suck, please don't use them for
index d0fc183c503bc485973a0040903a696db0c0f825..5e4b4ae23406a14d97958000602997c87396aee8 100644 (file)
@@ -301,22 +301,19 @@ log_end_msg () {
         RED=`$TPUT setaf 1`
         YELLOW=`$TPUT setaf 3`
         NORMAL=`$TPUT op`
-        if [ $1 -eq 0 ]; then
-            echo "."
-        elif [ $1 -eq 255 ]; then
-            /bin/echo -e " ${YELLOW}(warning).${NORMAL}"
-            retval=0
-        else
-            /bin/echo -e " ${RED}failed!${NORMAL}"
-        fi
     else
-       if [ $1 -eq 0 ]; then
-            echo "."
-        elif [ $1 -eq 255 ]; then
-            echo -e " (warning)."
-        else
-            echo " failed!"
-        fi
+        RED=''
+        YELLOW=''
+        NORMAL=''
+    fi
+
+    if [ $1 -eq 0 ]; then
+        echo "."
+    elif [ $1 -eq 255 ]; then
+        /bin/echo -e " ${YELLOW}(warning).${NORMAL}"
+        retval=0
+    else
+        /bin/echo -e " ${RED}failed!${NORMAL}"
     fi
     log_end_msg_post "$@"
     return $retval
diff --git a/test/lsb-test.sh b/test/lsb-test.sh
new file mode 100644 (file)
index 0000000..663d133
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+echo "Importing $1/init-functions"
+. $1/init-functions
+
+log_warning_msg "Only a warning"
+
+echo "OK!"