[OE-core] [PATCH] lib/oe/lsb.py: Stop parsing /etc/SuSE-release
Ed Bartosh
ed.bartosh at linux.intel.com
Fri Mar 20 11:22:50 UTC 2015
/etc/SuSE-release should not be parsed to obtain release info
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
All recent OpenSUSE versions already have /etc/os-release and
oe.lsb/release_dict_file function already parses it.
Current implementation of release_dict_file returns different values
when parsing /etc/SuSE-release and /etc/os-release. This is one more
advantage of getting rid of parsing /etc/SuSE-release.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta/lib/oe/lsb.py | 8 --------
1 file changed, 8 deletions(-)
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py
index 50c1d47..e25e282 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:
--
2.1.4
More information about the Openembedded-core
mailing list