[OE-core] [PATCH] package bbclass: allow per package PRIVATE_LIBS

Koen Kooi koen at dominion.thruhere.net
Thu Jan 26 17:03:14 UTC 2012


If a recipe packages multiple versions of shlib (e.g. powervr drivers) we only want the shlib code to pickup $PN, not $PN-foo subpackages.
This keeps backward compatibility with the global PRIVATE_LIBS usage if no per package PRIVATE_LIBS are set for a given package. In other words: this doesn't break the firefox recipe.

Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
---
 meta/classes/package.bbclass |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 45447e3..22a76cf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1246,7 +1246,8 @@ python package_do_shlibs() {
 				if not this_soname in sonames:
 					# if library is private (only used by package) then do not build shlib for it
 					if not private_libs or -1 == private_libs.find(this_soname):
-						sonames.append(this_soname)
+						if not private_libs_pkg or -1 == private_libs_pkg.find(this_soname):
+							sonames.append(this_soname)
 				if libdir_re.match(root):
 					needs_ldconfig = True
 				if snap_symlinks and (file != this_soname):
@@ -1328,6 +1329,8 @@ python package_do_shlibs() {
 	shlib_provider = {}
 	private_libs = d.getVar('PRIVATE_LIBS', True)
 	for pkg in packages.split():
+		if not private_libs:
+			private_libs_pkg = d.getVar('PRIVATE_LIBS_' + pkg, True)
 		needs_ldconfig = False
 		bb.debug(2, "calculating shlib provides for %s" % pkg)
 
-- 
1.7.2.5





More information about the Openembedded-core mailing list