From: Chris Lawrence Date: Fri, 18 Apr 2008 01:38:23 +0000 (-0500) Subject: lsb 3.2-9 Debian release. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~218 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=39f0d063f6976d1d44061f1f44a3861ff8b1e228;p=lsb.git lsb 3.2-9 Debian release. --- diff --git a/debian/changelog b/debian/changelog index 8213b06..07ad19b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 17 Apr 2008 20:38:23 -0500 + lsb (3.2-8) unstable; urgency=medium * Bump conflicts to python < 2.6. (Closes: #475953) diff --git a/init-functions b/init-functions index aa41e24..ce867cd 100644 --- a/init-functions +++ b/init-functions @@ -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 diff --git a/lsb_release b/lsb_release index a128888..12b3582 100755 --- a/lsb_release +++ b/lsb_release @@ -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