Package: lsb
Version: 3.2-20
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu intrepid ubuntu-patch



*** /tmp/tmpLNnEJz
In Ubuntu, we've applied the attached patch to achieve the following:

  * Since /etc/lsb-release overrides detected information, there's no
    need to try and detect that information if lsb-release contains
    everything we need.  This saves us calling the hugely expensive
    apt-cache.   LP: #262050.

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: lenny/sid
  APT prefers intrepid-updates
  APT policy: (500, 'intrepid-updates'), (500, 'intrepid-security'), (500, 
'intrepid-proposed'), (500, 'intrepid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru lsb-3.2/debian/changelog lsb-3.2/debian/changelog
diff -Nru lsb-3.2/lsb_release lsb-3.2/lsb_release
--- lsb-3.2/lsb_release 2008-07-24 20:03:03.000000000 +0100
+++ lsb-3.2/lsb_release 2009-01-15 21:26:38.000000000 +0000
@@ -241,9 +241,15 @@
     return distinfo
 
 def get_distro_information():
-    distinfo = guess_debian_release()
-    distinfo.update(get_lsb_information())
-    return distinfo
+    lsbinfo = get_lsb_information()
+    # OS is only used inside guess_debian_release anyway
+    for key in ('ID', 'RELEASE', 'CODENAME', 'DESCRIPTION',):
+        if key not in lsbinfo:
+            distinfo = guess_debian_release()
+            distinfo.update(lsbinfo)
+            return distinfo
+    else:
+        return lsbinfo
     
 def main():
     parser = OptionParser()

Reply via email to