Patchwork [v2] package bbclass: allow per package PRIVATE_LIBS

login
register
mail settings
Submitter Koen Kooi
Date Jan. 27, 2012, 4:50 p.m.
Message ID <1327683040-23382-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/20231/
State Accepted
Commit ce46dbddef40ae3eef7238ac07438b15bd09e156
Headers show

Comments

Koen Kooi - Jan. 27, 2012, 4:50 p.m.
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@dominion.thruhere.net>
---
 meta/classes/package.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Richard Purdie - Feb. 1, 2012, 3:24 p.m.
On Fri, 2012-01-27 at 17:50 +0100, Koen Kooi wrote:
> 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@dominion.thruhere.net>
> ---
>  meta/classes/package.bbclass |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 45447e3..0322a05 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1326,8 +1326,8 @@  python package_do_shlibs() {
 
 	needed = {}
 	shlib_provider = {}
-	private_libs = d.getVar('PRIVATE_LIBS', True)
 	for pkg in packages.split():
+		private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True)
 		needs_ldconfig = False
 		bb.debug(2, "calculating shlib provides for %s" % pkg)