summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/lsb.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/lsb.py')
-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 50c1d4720b..ddfe71b6b5 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -37,14 +37,6 @@ def release_dict_file():
37 if match: 37 if match:
38 data['DISTRIB_ID'] = match.group(1) 38 data['DISTRIB_ID'] = match.group(1)
39 data['DISTRIB_RELEASE'] = match.group(2) 39 data['DISTRIB_RELEASE'] = match.group(2)
40 elif os.path.exists('/etc/SuSE-release'):
41 data = {}
42 data['DISTRIB_ID'] = 'SUSE LINUX'
43 with open('/etc/SuSE-release') as f:
44 for line in f:
45 if line.startswith('VERSION = '):
46 data['DISTRIB_RELEASE'] = line[10:].rstrip()
47 break
48 elif os.path.exists('/etc/os-release'): 40 elif os.path.exists('/etc/os-release'):
49 data = {} 41 data = {}
50 with open('/etc/os-release') as f: 42 with open('/etc/os-release') as f:
@@ -53,6 +45,15 @@ def release_dict_file():
53 data['DISTRIB_ID'] = line[5:].rstrip().strip('"') 45 data['DISTRIB_ID'] = line[5:].rstrip().strip('"')
54 if line.startswith('VERSION_ID='): 46 if line.startswith('VERSION_ID='):
55 data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"') 47 data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"')
48 elif os.path.exists('/etc/SuSE-release'):
49 data = {}
50 data['DISTRIB_ID'] = 'SUSE LINUX'
51 with open('/etc/SuSE-release') as f:
52 for line in f:
53 if line.startswith('VERSION = '):
54 data['DISTRIB_RELEASE'] = line[10:].rstrip()
55 break
56
56 except IOError: 57 except IOError:
57 return None 58 return None
58 return data 59 return data