All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package.bbclass: exclude packages as shlib providers
@ 2018-07-17 15:40 Oleksii Konoplitskyi
  0 siblings, 0 replies; only message in thread
From: Oleksii Konoplitskyi @ 2018-07-17 15:40 UTC (permalink / raw)
  To: okonopli, aborduno, richard.purdie, xe-linux-external, openembedded-core

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 allows to set list of packages that are not candidates
for shlib providers.

Variable EXCLUDE_PACKAGES_FROM_SHLIBS is used, e.g.:
EXCLUDE_PACKAGES_FROM_SHLIBS = "glibc-ptest glibc-mtest"

Cc: Andrii Bordunov <aborduno@cisco.com>
Signed-off-by: Oleksii Konoplitskyi <okonopli@cisco.com>
---
 Hi Richard,

 I have updated Andrii's patch https://patchwork.openembedded.org/patch/132798/
 Please, check if comments are fixed.

 meta/classes/package.bbclass | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index edeffa9..07bc378 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1603,6 +1603,18 @@ python package_do_shlibs() {
     libdir_re = re.compile(".*/%s$" % d.getVar('baselib'))
 
     packages = d.getVar('PACKAGES')
+
+    shlib_pkgs = []
+    exclusion_list = d.getVar("EXCLUDE_PACKAGES_FROM_SHLIBS")
+    if exclusion_list:
+        for pkg in packages.split():
+            if pkg not in exclusion_list.split():
+                shlib_pkgs.append(pkg)
+            else:
+                bb.note("not generating shlibs for %s" % pkg)
+    else:
+        shlib_pkgs = packages.split()
+
     targetos = d.getVar('TARGET_OS')
 
     workdir = d.getVar('WORKDIR')
@@ -1734,7 +1746,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) or d.getVar('PRIVATE_LIBS') or ""
         private_libs = private_libs.split()
         needs_ldconfig = False
@@ -1806,7 +1818,7 @@ python package_do_shlibs() {
 
     libsearchpath = [d.getVar('libdir'), d.getVar('base_libdir')]
 
-    for pkg in packages.split():
+    for pkg in shlib_pkgs:
         bb.debug(2, "calculating shlib requirements for %s" % pkg)
 
         private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-17 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 15:40 [PATCH] package.bbclass: exclude packages as shlib providers Oleksii Konoplitskyi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.