]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta/lib/oe/lsb.py: extract only the needed info from lsb-release
authorCristian Iorga <cristian.iorga@intel.com>
Fri, 29 Mar 2013 14:10:51 +0000 (16:10 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Mar 2013 16:24:38 +0000 (16:24 +0000)
Instead of running lsb_release -a, a lsb_release -ir will be run.
This will prevent issue with distros that don't have all the needed
info in /etc/lsb-release file, in which case lsb_release won't generate
an error code.

Partial fix for [YOCTO #4071]

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/lsb.py

index ebf90baaced4e81e6403c738c367f184801d2475..fed1204e85e8e1f0cb3743f29ec734bbe9964782 100644 (file)
@@ -1,9 +1,9 @@
 def release_dict():
-    """Return the output of lsb_release -a as a dictionary"""
+    """Return the output of lsb_release -ir as a dictionary"""
     from subprocess import PIPE
 
     try:
-        output, err = bb.process.run(['lsb_release', '-a'], stderr=PIPE)
+        output, err = bb.process.run(['lsb_release', '-ir'], stderr=PIPE)
     except bb.process.CmdError as exc:
         return None