summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorCristian Iorga <cristian.iorga@intel.com>2013-03-29 16:10:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-30 09:08:11 +0000
commite9866ee0ff17f749d824fa40944f220a2a7f05b6 (patch)
tree3f9755d771d198f5f42d25be947e788284a28f25 /meta
parent851f1e368bea57e090a924330a08a793abfcfa55 (diff)
downloadpoky-e9866ee0ff17f749d824fa40944f220a2a7f05b6.tar.gz
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] (From OE-Core rev: 79a2252545ab50c79e00e02c328191c1163f917d) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/lsb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index ebf90baace..fed1204e85 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -1,9 +1,9 @@
1def release_dict(): 1def release_dict():
2 """Return the output of lsb_release -a as a dictionary""" 2 """Return the output of lsb_release -ir as a dictionary"""
3 from subprocess import PIPE 3 from subprocess import PIPE
4 4
5 try: 5 try:
6 output, err = bb.process.run(['lsb_release', '-a'], stderr=PIPE) 6 output, err = bb.process.run(['lsb_release', '-ir'], stderr=PIPE)
7 except bb.process.CmdError as exc: 7 except bb.process.CmdError as exc:
8 return None 8 return None
9 9