diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2014-01-28 15:26:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-29 17:38:50 +0000 |
commit | ee045eeb38ffd191c314e362539a006ecc8c19f5 (patch) | |
tree | dbaeb8a140bbfe5c616e6956a0cab81be4fb0fd0 /meta/classes/package.bbclass | |
parent | 5f4fdf87e922f648adc369965c689010ed278515 (diff) | |
download | poky-ee045eeb38ffd191c314e362539a006ecc8c19f5.tar.gz |
package.bbclass: Don't search for providers of PRIVATE_LIBS
* split PRIVATE_LIBS and don't use find(), so that libfoo cannot be
found in PRIVATE_LIBS = "libfoobar"
(From OE-Core rev: 2dec075478f977b554061dd9a4b2b8ff4af3597a)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 70f9aaa205..ed88dafc2c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1402,7 +1402,7 @@ python package_do_shlibs() { | |||
1402 | this_soname = m.group(1) | 1402 | this_soname = m.group(1) |
1403 | if not this_soname in sonames: | 1403 | if not this_soname in sonames: |
1404 | # if library is private (only used by package) then do not build shlib for it | 1404 | # if library is private (only used by package) then do not build shlib for it |
1405 | if not private_libs or -1 == private_libs.find(this_soname): | 1405 | if not private_libs or this_soname not in private_libs: |
1406 | sonames.append(this_soname) | 1406 | sonames.append(this_soname) |
1407 | if libdir_re.match(os.path.dirname(file)): | 1407 | if libdir_re.match(os.path.dirname(file)): |
1408 | needs_ldconfig = True | 1408 | needs_ldconfig = True |
@@ -1486,7 +1486,8 @@ python package_do_shlibs() { | |||
1486 | read_shlib_providers() | 1486 | read_shlib_providers() |
1487 | 1487 | ||
1488 | for pkg in packages.split(): | 1488 | for pkg in packages.split(): |
1489 | private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) | 1489 | private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True) or "" |
1490 | private_libs = private_libs.split() | ||
1490 | needs_ldconfig = False | 1491 | needs_ldconfig = False |
1491 | bb.debug(2, "calculating shlib provides for %s" % pkg) | 1492 | bb.debug(2, "calculating shlib provides for %s" % pkg) |
1492 | 1493 | ||
@@ -1556,6 +1557,14 @@ python package_do_shlibs() { | |||
1556 | 1557 | ||
1557 | deps = list() | 1558 | deps = list() |
1558 | for n in needed[pkg]: | 1559 | for n in needed[pkg]: |
1560 | # if n is in private libraries, don't try to search provider for it | ||
1561 | # this could cause problem in case some abc.bb provides private | ||
1562 | # /opt/abc/lib/libfoo.so.1 and contains /usr/bin/abc depending on system library libfoo.so.1 | ||
1563 | # but skipping it is still better alternative than providing own | ||
1564 | # version and then adding runtime dependency for the same system library | ||
1565 | if private_libs and n in private_libs: | ||
1566 | bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n)) | ||
1567 | continue | ||
1559 | if n in shlib_provider.keys(): | 1568 | if n in shlib_provider.keys(): |
1560 | (dep_pkg, ver_needed) = shlib_provider[n] | 1569 | (dep_pkg, ver_needed) = shlib_provider[n] |
1561 | 1570 | ||