summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-03-20 20:37:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-22 14:42:18 +0000
commit3acdd43b2f10b57cf26a7871b3d002f8241d41d8 (patch)
tree38a5031bcb7322740cd21e66480f2466c3008702 /meta/lib
parentcbce06a172c0fd0979e3f1fc6dcd4e24e235c30a (diff)
downloadast2050-yocto-poky-3acdd43b2f10b57cf26a7871b3d002f8241d41d8.zip
ast2050-yocto-poky-3acdd43b2f10b57cf26a7871b3d002f8241d41d8.tar.gz
lib/oe/lsb.py: Prioritize parsing of /etc/os-release
Moved parsing of /etc/os-release before parsing of /etc/SuSE-release as /etc/SuSE-release is deprecated in recent releases of OpenSuSE. Here is the quote from /etc/SuSE-release: /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead (From OE-Core rev: b3852bebb850048389994993e3717e54020c662f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/lsb.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 50c1d47..ddfe71b 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -37,14 +37,6 @@ def release_dict_file():
if match:
data['DISTRIB_ID'] = match.group(1)
data['DISTRIB_RELEASE'] = match.group(2)
- elif os.path.exists('/etc/SuSE-release'):
- data = {}
- data['DISTRIB_ID'] = 'SUSE LINUX'
- with open('/etc/SuSE-release') as f:
- for line in f:
- if line.startswith('VERSION = '):
- data['DISTRIB_RELEASE'] = line[10:].rstrip()
- break
elif os.path.exists('/etc/os-release'):
data = {}
with open('/etc/os-release') as f:
@@ -53,6 +45,15 @@ def release_dict_file():
data['DISTRIB_ID'] = line[5:].rstrip().strip('"')
if line.startswith('VERSION_ID='):
data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"')
+ elif os.path.exists('/etc/SuSE-release'):
+ data = {}
+ data['DISTRIB_ID'] = 'SUSE LINUX'
+ with open('/etc/SuSE-release') as f:
+ for line in f:
+ if line.startswith('VERSION = '):
+ data['DISTRIB_RELEASE'] = line[10:].rstrip()
+ break
+
except IOError:
return None
return data
OpenPOWER on IntegriCloud