lsb 3.2-25 Debian release.
authorChris Lawrence <lawrencc@debian.org>
Mon, 27 Sep 2010 06:15:49 +0000 (01:15 -0500)
committerDidier Raboud <odyx@debian.org>
Mon, 27 Sep 2010 06:15:49 +0000 (01:15 -0500)
debian/changelog
init-functions
lsb.8
lsb_release.py

index 224e2234f88dfb4ed37aa059ae0d09304704e204..afb1c371a5c0ac261b732a827baf75e63f0030d4 100644 (file)
@@ -1,3 +1,14 @@
+lsb (3.2-25) unstable; urgency=low
+
+  * Improve release comparison function when 'suite' is missing from
+    sources.list.  (Closes: #597667)
+  * return 3 in pidofproc() if we can't track down a running copy of
+    the process and the pidfile is missing.  (Closes: #597628)
+  * Correct location of README.Debian.gz in lsb(8).  (Closes: #589100)
+  * Add link to LSB specification in lsb(8).  (Closes: #589102)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 27 Sep 2010 01:15:49 -0500
+
 lsb (3.2-24) unstable; urgency=low
 
   * Improve detection of Debian version when there is a "tie" in
index 67f2fb07d82c4cc96ab89f6e595541f314137ce1..57444b8971e4ac93a0d9e485242294e6a225b7a4 100644 (file)
@@ -91,7 +91,7 @@ pidofproc () {
             fi
         fi
     fi
-    if [ -x /bin/pidof -a "$specified" ]; then
+    if [ -x /bin/pidof -a "$specified" ]; then
         status="0"
         /bin/pidof -o %PPID -x $1 || status="$?"
         if [ "$status" = 1 ]; then
@@ -99,6 +99,9 @@ pidofproc () {
         fi
         return 0
     fi
+    if [ "$specified" ]; then
+        return 3 # almost certain it's not running
+    fi
     return 4 # Unable to determine status
 }
 
diff --git a/lsb.8 b/lsb.8
index fa6b7887e20a4495a7ea02d573623805fec42527..20896ef8d62bed3e478f71618bf7fe6cbc9ec459 100644 (file)
--- a/lsb.8
+++ b/lsb.8
@@ -27,8 +27,9 @@ third-party packages.  The goal of the LSB is to make it easy to
 create binary packages that will run on any Linux distribution.  For
 more information on the standard, please see the LSB web site.
 .SH SEE ALSO
-.BR /usr/share/doc/lsb-core/README.Debian
+.BR /usr/share/doc/lsb-core/README.Debian.gz
 .BR http://www.linuxbase.org/
+.BR http://refspecs.freestandards.org/lsb.shtml
 .SH AUTHOR
 This manual page was written by Chris Lawrence <lawrencc@debian.org>
 for the Debian system (but may be used by others).
index 495e7ccff75c0ed693757f959787ada2af6e61ff..51e6978d4c0c00590052242002b8f4fc07c92157 100644 (file)
@@ -36,6 +36,8 @@ RELEASE_CODENAME_LOOKUP = {
     '3.1' : 'sarge',
     '4.0' : 'etch',
     '5.0' : 'lenny',
+    '6.0' : 'squeeze',
+    '7.0' : 'wheezy',
     }
 
 TESTING_CODENAME = 'unknown.new.testing'
@@ -134,6 +136,18 @@ def parse_policy_line(data):
                 retval[longnames[k]] = v
     return retval
 
+def compare_release(x, y):
+    suite_x = y[1].get('suite')
+    suite_y = x[1].get('suite')
+
+    if suite_x and suite_y:
+        if suite_x in RELEASES_ORDER and suite_y in RELEASES_ORDER:
+            return RELEASES_ORDER.index(suite_y)-RELEASES_ORDER.index(suite_x)
+        else:
+            return cmp(suite_x, suite_y)
+
+    return 0
+
 def parse_apt_policy():
     data = []
     
@@ -176,7 +190,7 @@ def guess_release_from_apt(origin='Debian', component='main',
 
     max_priority = releases[0][0]
     releases = [x for x in releases if x[0] == max_priority]
-    releases.sort(cmp = lambda x,y: RELEASES_ORDER.index(y[1]['suite']) - RELEASES_ORDER.index(x[1]['suite']))
+    releases.sort(compare_release)
 
     return releases[0][1]