]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: Create empty key/value if not there for shlib_provider
authorKhem Raj <raj.khem@gmail.com>
Fri, 21 Nov 2014 18:05:03 +0000 (10:05 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Dec 2014 10:17:34 +0000 (10:17 +0000)
When we use ASSUME_SHLIBS,e.g.

ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"

then we end up with errors like below when using shlibs2 (dizzy+)

File: 'package_do_shlibs', lineno: 216, function: package_do_shlibs
     0212:            dep_pkg = dep_pkg.rsplit("_", 1)
     0213:            if len(dep_pkg) == 2:
     0214:                lib_ver = dep_pkg[1]
     0215:            dep_pkg = dep_pkg[0]
 *** 0216:            shlib_provider[l][libdir] = (dep_pkg, lib_ver)
     0217:
     0218:    libsearchpath = [d.getVar('libdir', True),
d.getVar('base_libdir', True)]
     0219:
     0220:    for pkg in packages.split():
Exception: KeyError: 'libEGL.so.1'

This is because the entry which is being populated does not exist
so lets create it if its not already there.

Change-Id: I9e292c5439e5d1e01ea48341334507aacc3784ae
(From OE-Core rev: a64f81fcef42172f788cec7a63bb4672eac99f94)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/classes/package.bbclass

index 2aec3e6bd91e723166c4b6313499b329c6c2d1f6..696d173cedd7f66cdba2c6b83846388d247e6815 100644 (file)
@@ -1554,6 +1554,8 @@ python package_do_shlibs() {
             if len(dep_pkg) == 2:
                 lib_ver = dep_pkg[1]
             dep_pkg = dep_pkg[0]
+            if l not in shlib_provider:
+                shlib_provider[l] = {}
             shlib_provider[l][libdir] = (dep_pkg, lib_ver)
 
     libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)]