public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] package.bbclass: allow using EXCLUDE_FROM_SHLIBS for subpackages
@ 2016-10-10 17:02 Andrii Bordunov
  2016-10-19 13:58 ` Andrii Bordunov
  2016-11-16 10:47 ` Richard Purdie
  0 siblings, 2 replies; 10+ messages in thread
From: Andrii Bordunov @ 2016-10-10 17:02 UTC (permalink / raw)
  To: openembedded-core; +Cc: Andrii Bordunov

Some packages containing shared libraries might be registered
as shlib providers when they shouldn't (for example, the lib is for
their private use and must not generate any dependency).

EXCLUDE_FROM_SHLIBS is targeted at that, but it could be set
for entire recipe only.

This patch expands EXCLUDE_FROM_SHLIBS usage, so now it's possible
to set it in a style similar with RDEPENDS. For example:
 EXCLUDE_FROM_SHLIBS_${PN}-ptest = "1"

Signed-off-by: Andrii Bordunov <aborduno@cisco.com>
---
 meta/classes/package.bbclass | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index a6f0a7a..9bf43dc 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1499,6 +1499,14 @@ python package_do_shlibs() {
     libdir_re = re.compile(".*/%s$" % d.getVar('baselib', True))
 
     packages = d.getVar('PACKAGES', True)
+
+    shlib_pkgs = []
+    for pkg in packages.split():
+        if d.getVar('EXCLUDE_FROM_SHLIBS_' + pkg, 0):
+            bb.note("not generating shlibs for %s" % pkg)
+        else:
+            shlib_pkgs.append(pkg)
+
     targetos = d.getVar('TARGET_OS', True)
 
     workdir = d.getVar('WORKDIR', True)
@@ -1614,7 +1622,7 @@ python package_do_shlibs() {
     needed = {}
     shlib_provider = oe.package.read_shlib_providers(d)
 
-    for pkg in packages.split():
+    for pkg in shlib_pkgs:
         private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) or ""
         private_libs = private_libs.split()
         needs_ldconfig = False
@@ -1684,7 +1692,7 @@ python package_do_shlibs() {
 
     libsearchpath = [d.getVar('libdir', True), d.getVar('base_libdir', True)]
 
-    for pkg in packages.split():
+    for pkg in shlib_pkgs:
         bb.debug(2, "calculating shlib requirements for %s" % pkg)
 
         deps = list()
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-16 12:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10 17:02 [PATCH] package.bbclass: allow using EXCLUDE_FROM_SHLIBS for subpackages Andrii Bordunov
2016-10-19 13:58 ` Andrii Bordunov
2016-11-15 15:05   ` Andrii Bordunov
2016-11-16 10:29     ` Burton, Ross
2016-11-16 10:47 ` Richard Purdie
2017-03-16 15:07   ` Andrii Bordunov
2018-03-13 17:25     ` [PATCH v3] " Andrii Bordunov
2018-04-12 14:42       ` Andrii Bordunov
2018-06-11 12:20         ` Andrii Bordunov
2018-06-16 12:00           ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox