From: Chris Lawrence Date: Tue, 21 Jul 2009 09:03:41 +0000 (-0500) Subject: lsb 3.2-23 Debian release. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~204 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=09ca3c511d65acd921f6f2875e2103ada213a3c1;p=lsb.git lsb 3.2-23 Debian release. --- diff --git a/debian/changelog b/debian/changelog index 08de077..46c314a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +lsb (3.2-23) unstable; urgency=low + + * Fix tests for $TERM in log_use_fancy_output(). (Closes: #537112, #536190) + * Add libnss3-1d and libqt4-sql-sqlite to lsb-desktop dependencies. + (Closes: #534277, #534452) + * Properly trap open() failures in lsb_release. (Closes: #521462) + * Ignore empty arguments in /etc/lsb-release. (Closes: #485565) + May also fix #514041. + * Better test for existant but unreadable PID file. (Closes: #527890) + * Add some punctuation to log_{warning,failure}_msg. (Closes: #525684) + * lsb-core depends on cups-bsd | lpr, since it is more likely that + someone in 2009 will have CUPS installed already than want to use lpr + instead. (Closes: #512098) + + -- Chris Lawrence Tue, 21 Jul 2009 04:03:41 -0500 + lsb (3.2-22) unstable; urgency=low * Fix quoting of $PWD in start-stop-daemon call. (Closes: #520499) diff --git a/debian/control b/debian/control index 9cad9fc..1bbdd02 100644 --- a/debian/control +++ b/debian/control @@ -3,13 +3,13 @@ Section: misc Priority: extra Maintainer: Chris Lawrence Build-Depends: debhelper (>> 7), po-debconf (>= 0.5.0), dpkg-dev (>= 1.10), python-support, python-all-dev -Standards-Version: 3.8.1 +Standards-Version: 3.8.2 XS-Python-Version: current Homepage: http://www.linux-foundation.org/en/LSB Package: lsb-core Architecture: any -Depends: lsb-release, ${glibc}, libz1, libncurses5, libpam0g, exim4 | mail-transport-agent, at, bc, binutils, bsdmainutils, bsdutils, cpio, cron, ed, file, libc6-dev | libc-dev, locales, lpr, lprng | cups-client, m4, mailx | mailutils, make, man-db, mawk | gawk, ncurses-term, passwd, patch, pax, procps, psmisc, rsync, alien (>= 8.36), ${python:Depends}, ${misc:Depends}, ${depends}, lsb-base, time +Depends: lsb-release, ${glibc}, libz1, libncurses5, libpam0g, exim4 | mail-transport-agent, at, bc, binutils, bsdmainutils, bsdutils, cpio, cron, ed, file, libc6-dev | libc-dev, locales, cups-bsd | lpr, lprng | cups-client, m4, mailx | mailutils, make, man-db, mawk | gawk, ncurses-term, passwd, patch, pax, procps, psmisc, rsync, alien (>= 8.36), ${python:Depends}, ${misc:Depends}, ${depends}, lsb-base, time Provides: lsb-core-noarch, ${provides} Conflicts: python (>= 2.6), lsb (<< 2.0-2) Replaces: lsb (<< 2.0-2) @@ -76,7 +76,7 @@ Description: Linux Standard Base 3.2 C++ support package Package: lsb-desktop Architecture: any -Depends: lsb-graphics, fontconfig (>= 2.3.0), libfontconfig1 (>= 2.3.0), libpng12-0, libjpeg62, libglib2.0-0 (>= 2.6.2), libatk1.0-0 (>= 1.9.0), libpango1.0-0 (>= 1.8.0), libgtk2.0-0 (>= 2.6.2), libqt3-mt (>= 3.3.6), libqt4-gui (>= 4.2), libxml2, libfreetype6, libxrender1, libxft2, xdg-utils, ${misc:Depends} +Depends: lsb-graphics, fontconfig (>= 2.3.0), libfontconfig1 (>= 2.3.0), libpng12-0, libjpeg62, libglib2.0-0 (>= 2.6.2), libatk1.0-0 (>= 1.9.0), libpango1.0-0 (>= 1.8.0), libgtk2.0-0 (>= 2.6.2), libqt3-mt (>= 3.3.6), libqt4-gui (>= 4.2), libxml2, libfreetype6, libxrender1, libxft2, xdg-utils, libnss3-1d, libqt4-sql-sqlite, ${misc:Depends} Provides: lsb-desktop-noarch, lsb-qt4, lsb-qt4-noarch, ${provides} Description: Linux Standard Base 3.2 Desktop support package The Linux Standard Base (http://www.linuxbase.org/) is a standard @@ -91,9 +91,9 @@ Description: Linux Standard Base 3.2 Desktop support package . The intent of this package is to provide a best current practice way of installing and running LSB packages on Debian GNU/Linux. Its - presence does not imply that Debian fully complies - with the Linux Standard Base, and should not be construed as a - statement that Debian is LSB-compliant. + presence does not imply that Debian fully complies with the Linux + Standard Base, and should not be construed as a statement that Debian + is LSB-compliant. Package: lsb-qt4 Architecture: any diff --git a/init-functions b/init-functions index ba7768a..0514b0f 100644 --- a/init-functions +++ b/init-functions @@ -77,7 +77,7 @@ pidofproc () { pidfile="/var/run/$base.pid" fi - if [ -n "${pidfile:-}" -a -e "$pidfile" ]; then + if [ -n "${pidfile:-}" -a -r "$pidfile" ]; then read pid < "$pidfile" if [ -n "${pid:-}" ]; then if $(kill -0 "${pid:-}" 2> /dev/null); then @@ -99,10 +99,7 @@ pidofproc () { fi return 0 fi - if [ "$specified" ]; then - return 3 # program does not appear to be running after trying PID file - fi - return 4 # program or service is unknown + return 4 # Unable to determine status } # start-stop-daemon uses the same algorithm as "pidofproc" above. @@ -179,6 +176,9 @@ status_of_proc () { if [ "$status" = 0 ]; then log_success_msg "$name is running" return 0 + elif [ "$status" = 4 ]; then + log_failure_msg "could not access PID file for $name" + return $status else log_failure_msg "$name is not running" return $status @@ -188,7 +188,7 @@ status_of_proc () { log_use_fancy_output () { TPUT=/usr/bin/tput EXPR=/usr/bin/expr - 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 + if [ -t 1 ] && [ "x${TERM:-}" != "x" ] && [ "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 @@ -208,14 +208,14 @@ log_success_msg () { log_failure_msg () { if [ -n "${1:-}" ]; then - log_begin_msg $@ + log_begin_msg $@ "..." fi log_end_msg 1 || true } log_warning_msg () { if [ -n "${1:-}" ]; then - log_begin_msg $@ + log_begin_msg $@ "..." fi log_end_msg 255 || true } diff --git a/lsb_release.py b/lsb_release.py index 7269322..cbae155 100644 --- a/lsb_release.py +++ b/lsb_release.py @@ -132,7 +132,7 @@ def parse_policy_line(data): def parse_apt_policy(): data = [] - policy = commands.getoutput('apt-cache policy 2>/dev/null') + policy = commands.getoutput('LANG=C apt-cache policy 2>/dev/null') for line in policy.split('\n'): line = line.strip() m = re.match(r'(\d+)', line) @@ -185,7 +185,12 @@ def guess_debian_release(): distinfo['DESCRIPTION'] = '%(ID)s %(OS)s' % distinfo if os.path.exists('/etc/debian_version'): - release = open('/etc/debian_version').read().strip() + try: + release = open('/etc/debian_version').read().strip() + except IOError, msg: + print >> sys.stderr, 'Unable to open /etc/debian_version:', str(msg) + release = 'unknown' + if not release[0:1].isalpha(): # /etc/debian_version should be numeric codename = lookup_codename(release, 'n/a') @@ -231,19 +236,24 @@ def guess_debian_release(): def get_lsb_information(): distinfo = {} if os.path.exists('/etc/lsb-release'): - for line in open('/etc/lsb-release'): - line = line.strip() - if not line: - continue - # Skip invalid lines - if not '=' in line: - continue - var, arg = line.split('=', 1) - if var.startswith('DISTRIB_'): - var = var[8:] - if arg.startswith('"') and arg.endswith('"'): - arg = arg[1:-1] - distinfo[var] = arg + try: + for line in open('/etc/lsb-release'): + line = line.strip() + if not line: + continue + # Skip invalid lines + if not '=' in line: + continue + var, arg = line.split('=', 1) + if var.startswith('DISTRIB_'): + var = var[8:] + if arg.startswith('"') and arg.endswith('"'): + arg = arg[1:-1] + if arg: # Ignore empty arguments + distinfo[var] = arg + except IOError, msg: + print >> sys.stderr, 'Unable to open /etc/lsb-release:', str(msg) + return distinfo def get_distro_information():