Package: lsb-release
Version: 3.0-11
Tags: patch

lsb-release tries to deal with the case where /etc/debian_version is
missing, but doesn't quite manage it.
https://launchpad.net/distros/ubuntu/+source/lsb-release/+bug/4912 is a
bug report from an Ubuntu user who thought (incorrectly) that
/etc/debian_version was a leftover from their previous Debian
installation and tried to remove it, only to discover that lsb_release
fell over.

The attached patch fixes this.

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]
diff -Nru /tmp/llscgXSVN0/lsb-3.0/lsb_release 
/tmp/1qd77oeAg1/lsb-3.0/lsb_release
--- /tmp/llscgXSVN0/lsb-3.0/lsb_release 2005-09-25 00:09:01.000000000 +0100
+++ /tmp/1qd77oeAg1/lsb-3.0/lsb_release 2005-12-02 14:57:27.000000000 +0000
@@ -88,6 +88,8 @@
     else:
         distinfo['OS'] = 'GNU'
 
+    distinfo['DESCRIPTION'] = '%(ID)s %(OS)s' % distinfo
+
     if os.path.exists('/etc/debian_version'):
         release = open('/etc/debian_version').read().strip()
         if not release[0:1].isalpha():
@@ -97,8 +99,8 @@
         else:
             # Guess with apt policy before being this stupid?
             distinfo.update({ 'RELEASE' : release, 'CODENAME' : 'sid'})
+        distinfo['DESCRIPTION'] += ' %(RELEASE)s (%(CODENAME)s)' % distinfo
 
-    distinfo['DESCRIPTION'] = '%(ID)s %(OS)s %(RELEASE)s (%(CODENAME)s)' % 
distinfo
     return distinfo
 
 def get_distro_information():

Reply via email to