lsb 3.2-9 Debian release.
authorChris Lawrence <lawrencc@debian.org>
Fri, 18 Apr 2008 01:38:23 +0000 (20:38 -0500)
committerDidier Raboud <odyx@debian.org>
Fri, 18 Apr 2008 01:38:23 +0000 (20:38 -0500)
debian/changelog
init-functions
lsb_release

index 8213b060f31a135f740568f31a1222998d14744a..07ad19b525fb522c41dd998de212d67954619fc6 100644 (file)
@@ -1,3 +1,13 @@
+lsb (3.2-9) unstable; urgency=low
+
+  * Fix lsb_release detection when apt-cache policy identifies no Debian
+    sources.  (Closes: #476288)
+  * Only use fancy TTY output if TERM is set and FD 1 is a terminal.
+    (Closes: #470993)
+  * Do not use eval in start_daemon().  (Closes: #406059)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Thu, 17 Apr 2008 20:38:23 -0500
+
 lsb (3.2-8) unstable; urgency=medium
 
   * Bump conflicts to python < 2.6.  (Closes: #475953)
index aa41e249f0fbeec5af5d905f9ca5a5b795ffa686..ce867cd43ecbfa48d1c115233976909283b9c864 100644 (file)
@@ -50,11 +50,11 @@ start_daemon () {
     exec="$1"; shift
 
     if [ $force = 1 ]; then
-        eval /sbin/start-stop-daemon --start --nicelevel $nice --quiet --startas $exec --pidfile /dev/null --oknodo -- "$@"
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --startas $exec --pidfile /dev/null --oknodo -- "$@"
     elif [ $pidfile ]; then
-        eval /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo --pidfile "$pidfile" -- "$@"
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo --pidfile "$pidfile" -- "$@"
     else
-        eval /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo -- "$@"
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo -- "$@"
     fi
 }
 
@@ -149,7 +149,7 @@ killproc () {
 log_use_fancy_output () {
     TPUT=/usr/bin/tput
     EXPR=/usr/bin/expr
-    if [ "x$TERM" != "xdumb" ] && [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1 && $TPUT setaf 1 >/dev/null 2>&1; then
+    if [ -t 1 ] && [ "x$TERM" != "" ] && [ "x$TERM" != "xdumb" ] && [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1 && $TPUT setaf 1 >/dev/null 2>&1; then
         [ -z $FANCYTTY ] && FANCYTTY=1 || true
     else
         FANCYTTY=0
index a128888107c58fd82ade0d6aab59aa4ba070827a..12b35822b34586cb526ef168cd3d81c02263e999 100755 (executable)
@@ -36,6 +36,7 @@ RELEASE_CODENAME_LOOKUP = {
     '3.0' : 'woody',
     '3.1' : 'sarge',
     '4.0' : 'etch',
+    '4.1' : 'lenny',
     }
 
 TESTING_CODENAME = 'lenny'
@@ -154,6 +155,10 @@ def guess_release_from_apt(origin='Debian', component='main',
         x[1].get('origin', '') == origin and
         x[1].get('component', '') == component and
         x[1].get('label', '') == label)]
+
+    # Check again to make sure we didn't wipe out all of the releases
+    if not releases:
+        return None
     
     releases.sort()
     releases.reverse()
@@ -182,6 +187,12 @@ def guess_debian_release():
             # /etc/debian_version should be numeric
             codename = lookup_codename(release, 'n/a')
             distinfo.update({ 'RELEASE' : release, 'CODENAME' : codename })
+        elif release.endswith('/sid')
+            distinfo['RELEASE'] = 'testing/unstable'
+            distinfo['CODENAME'] = release
+        elif release.endswith('/unstable'):
+            distinfo['RELEASE'] = '%s/sid' % TESTING_CODENAME
+            distinfo['CODENAME'] = 'testing/unstable'
         else:
             distinfo['RELEASE'] = release
             distinfo['CODENAME'] = None
@@ -208,9 +219,9 @@ def guess_debian_release():
                 codename = 'sid'
         distinfo.update({ 'RELEASE' : release, 'CODENAME' : codename })
 
-    if 'RELEASE' in distinfo:
+    if distinfo.get('RELEASE'):
         distinfo['DESCRIPTION'] += ' %(RELEASE)s' % distinfo
-    if 'CODENAME' in distinfo:
+    if distinfo.get('CODENAME'):
         distinfo['DESCRIPTION'] += ' (%(CODENAME)s)' % distinfo
 
     return distinfo