summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorOleksii Konoplitskyi <okonopli@cisco.com>2018-07-17 18:40:34 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-24 11:52:26 +0100
commit1d8c7fa36981dcecda45a417b0eb3943e049f4e0 (patch)
tree0d198c13b3b4f63be0e3db77770ccf623eb82f1c /meta/classes
parentb0f2f690a3513e4c9fa30fee1b8d7ac2d7140657 (diff)
downloadpoky-1d8c7fa36981dcecda45a417b0eb3943e049f4e0.tar.gz
package.bbclass: exclude packages as shlib providers
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> (From OE-Core rev: 43be374a6deceeaf105794f034957c65bb6bec72) Signed-off-by: Oleksii Konoplitskyi <okonopli@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass16
1 files changed, 14 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index edeffa978f..07bc37879c 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1603,6 +1603,18 @@ python package_do_shlibs() {
1603 libdir_re = re.compile(".*/%s$" % d.getVar('baselib')) 1603 libdir_re = re.compile(".*/%s$" % d.getVar('baselib'))
1604 1604
1605 packages = d.getVar('PACKAGES') 1605 packages = d.getVar('PACKAGES')
1606
1607 shlib_pkgs = []
1608 exclusion_list = d.getVar("EXCLUDE_PACKAGES_FROM_SHLIBS")
1609 if exclusion_list:
1610 for pkg in packages.split():
1611 if pkg not in exclusion_list.split():
1612 shlib_pkgs.append(pkg)
1613 else:
1614 bb.note("not generating shlibs for %s" % pkg)
1615 else:
1616 shlib_pkgs = packages.split()
1617
1606 targetos = d.getVar('TARGET_OS') 1618 targetos = d.getVar('TARGET_OS')
1607 1619
1608 workdir = d.getVar('WORKDIR') 1620 workdir = d.getVar('WORKDIR')
@@ -1734,7 +1746,7 @@ python package_do_shlibs() {
1734 needed = {} 1746 needed = {}
1735 shlib_provider = oe.package.read_shlib_providers(d) 1747 shlib_provider = oe.package.read_shlib_providers(d)
1736 1748
1737 for pkg in packages.split(): 1749 for pkg in shlib_pkgs:
1738 private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or "" 1750 private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""
1739 private_libs = private_libs.split() 1751 private_libs = private_libs.split()
1740 needs_ldconfig = False 1752 needs_ldconfig = False
@@ -1806,7 +1818,7 @@ python package_do_shlibs() {
1806 1818
1807 libsearchpath = [d.getVar('libdir'), d.getVar('base_libdir')] 1819 libsearchpath = [d.getVar('libdir'), d.getVar('base_libdir')]
1808 1820
1809 for pkg in packages.split(): 1821 for pkg in shlib_pkgs:
1810 bb.debug(2, "calculating shlib requirements for %s" % pkg) 1822 bb.debug(2, "calculating shlib requirements for %s" % pkg)
1811 1823
1812 private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or "" 1824 private_libs = d.getVar('PRIVATE_LIBS_' + pkg) or d.getVar('PRIVATE_LIBS') or ""