diff options
author | Cristian Iorga <cristian.iorga@intel.com> | 2013-03-29 11:19:01 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-29 09:37:38 +0000 |
commit | bacdb99a424fd96e5e60b740e1910163daa74aef (patch) | |
tree | 21d6bc095eb13dca0af7363feafd05b650977a2b /meta/lib/oe | |
parent | 4dc31a327be1a506e78e1d028db08ceee22a216f (diff) | |
download | poky-bacdb99a424fd96e5e60b740e1910163daa74aef.tar.gz |
meta/lib/oe/lsb.py: fix data extraction from /etc/lsb-release
In some cases, /etc/lsb-release file is used to extract
info about poky build host machine. But the strings are
not stripped of end of line special characters. As such,
when this info is concatenated and used as a directory
entry in sstate_cache, this is an issue.
Usually, this issue is masked by the fact that distro
related info is extracted from the output of lsb_release
command. In case of Yocto Linux, running "lsb_release -a"
will give an error code because CODENAME info is not present.
As such, bitbake will extract the info from /etc/lsb-release,
running into the above issue.
Consequence is that building under BA will crash.
Partial fix for [YOCTO #4071]
(From OE-Core rev: 5d0839bef631dceb4395fcf204779a76966a1061)
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r-- | meta/lib/oe/lsb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py index f4a5ba1c17..ebf90baace 100644 --- a/meta/lib/oe/lsb.py +++ b/meta/lib/oe/lsb.py | |||
@@ -26,7 +26,7 @@ def release_dict_file(): | |||
26 | with open('/etc/lsb-release') as f: | 26 | with open('/etc/lsb-release') as f: |
27 | for line in f: | 27 | for line in f: |
28 | key, value = line.split("=", 1) | 28 | key, value = line.split("=", 1) |
29 | data[key] = value | 29 | data[key] = value.strip() |
30 | elif os.path.exists('/etc/redhat-release'): | 30 | elif os.path.exists('/etc/redhat-release'): |
31 | data = {} | 31 | data = {} |
32 | with open('/etc/redhat-release') as f: | 32 | with open('/etc/redhat-release') as f: |