[oe-commits] Cristian Iorga : meta/lib/oe/lsb.py: fix data extraction from /etc/ lsb-release

git at git.openembedded.org git at git.openembedded.org
Fri Mar 29 09:35:42 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 62ed86b8724a6c5a25563638bc2c25b2ae18682d
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=62ed86b8724a6c5a25563638bc2c25b2ae18682d

Author: Cristian Iorga <cristian.iorga at intel.com>
Date:   Fri Mar 29 11:19:01 2013 +0200

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]

Signed-off-by: Cristian Iorga <cristian.iorga at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 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 f4a5ba1..ebf90ba 100644
--- a/meta/lib/oe/lsb.py
+++ b/meta/lib/oe/lsb.py
@@ -26,7 +26,7 @@ def release_dict_file():
             with open('/etc/lsb-release') as f:
                 for line in f:
                     key, value = line.split("=", 1)
-                    data[key] = value
+                    data[key] = value.strip()
         elif os.path.exists('/etc/redhat-release'):
             data = {}
             with open('/etc/redhat-release') as f:





More information about the Openembedded-commits mailing list