[oe-commits] Cristian Iorga : meta/lib/oe/lsb.py: extract only the needed info from lsb-release

git at git.openembedded.org git at git.openembedded.org
Sat Mar 30 09:06:08 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: 79a2252545ab50c79e00e02c328191c1163f917d
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=79a2252545ab50c79e00e02c328191c1163f917d

Author: Cristian Iorga <cristian.iorga at intel.com>
Date:   Fri Mar 29 16:10:51 2013 +0200

meta/lib/oe/lsb.py: extract only the needed info from lsb-release

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 at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oe/lsb.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index ebf90ba..fed1204 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -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
 





More information about the Openembedded-commits mailing list