aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2014-01-19 16:24:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-19 17:16:57 +0000
commit8141e3f61f12c8901b990496bcf6b76a9db95a57 (patch)
tree5c94f54691b1a1c17721b5151431f21087c14639
parentc5076f33ac27c0c2b0743bf6dc4edc983254c467 (diff)
downloadopenembedded-core-contrib-8141e3f61f12c8901b990496bcf6b76a9db95a57.tar.gz
openembedded-core-contrib-8141e3f61f12c8901b990496bcf6b76a9db95a57.tar.bz2
openembedded-core-contrib-8141e3f61f12c8901b990496bcf6b76a9db95a57.zip
package.bbclass: show warning when package is providing already provided shlib
* move read_shlib_providers before registering package as provider and show warning when different package tries to provide something already provided. [YOCTO #4628] Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package.bbclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 7dcec5ebf4..9b511a6bc9 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1356,6 +1356,7 @@ python package_do_shlibs() {
list_re = re.compile('^(.*)\.list$')
# Go from least to most specific since the last one found wins
for dir in reversed(shlibs_dirs):
+ bb.debug(2, "Reading shlib providers in %s" % (dir))
if not os.path.exists(dir):
continue
for file in os.listdir(dir):
@@ -1471,6 +1472,8 @@ python package_do_shlibs() {
needed = {}
shlib_provider = {}
+ read_shlib_providers()
+
for pkg in packages.split():
private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True)
needs_ldconfig = False
@@ -1504,6 +1507,11 @@ python package_do_shlibs() {
if len(sonames):
fd = open(shlibs_file, 'w')
for s in sonames:
+ if s in shlib_provider:
+ (old_pkg, old_pkgver) = shlib_provider[s]
+ if old_pkg != pkg:
+ bb.warn('%s-%s was registered as shlib provider for %s, changing it to %s-%s because it was built later' % (old_pkg, old_pkgver, s, pkg, pkgver))
+ bb.debug(1, 'registering %s-%s as shlib provider for %s' % (pkg, pkgver, s))
fd.write(s + '\n')
shlib_provider[s] = (pkg, pkgver)
fd.close()
@@ -1517,8 +1525,7 @@ python package_do_shlibs() {
postinst = '#!/bin/sh\n'
postinst += d.getVar('ldconfig_postinst_fragment', True)
d.setVar('pkg_postinst_%s' % pkg, postinst)
-
- read_shlib_providers()
+ bb.debug(1, 'LIBNAMES: pkg %s sonames %s' % (pkg, sonames))
bb.utils.unlockfile(lf)