summaryrefslogtreecommitdiff
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2014-01-28 15:26:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-29 17:38:09 +0000
commitcf0696a39b811b13bb6e7dd06a2dad607e93a643 (patch)
tree872be3165d5f0ffb697da9e46b78a6632123f58e /meta/classes/package.bbclass
parent2dec075478f977b554061dd9a4b2b8ff4af3597a (diff)
downloadopenembedded-core-cf0696a39b811b13bb6e7dd06a2dad607e93a643.tar.gz
openembedded-core-cf0696a39b811b13bb6e7dd06a2dad607e93a643.tar.bz2
openembedded-core-cf0696a39b811b13bb6e7dd06a2dad607e93a643.zip
package.bbclass: Show which files require given dependency in debug output
* when log.do_package shows some unexpected dependency, people usually need to grep package directory to find which binary was creating that dependency, show it directly in the debug output 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.bbclass12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index ed88dafc2c..1f73ad6960 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1397,6 +1397,9 @@ python package_do_shlibs() {
if m:
if m.group(1) not in needed[pkg]:
needed[pkg].append(m.group(1))
+ if m.group(1) not in needed_from:
+ needed_from[m.group(1)] = []
+ needed_from[m.group(1)].append(file)
m = re.match("\s+SONAME\s+([^\s]*)", l)
if m:
this_soname = m.group(1)
@@ -1469,6 +1472,10 @@ python package_do_shlibs() {
needed[pkg] = []
if name and name not in needed[pkg]:
needed[pkg].append(name)
+ if name not in needed_from:
+ needed_from[name] = []
+ if lafile and lafile not in needed_from[name]:
+ needed_from[name].append(lafile)
#bb.note("Adding %s for %s" % (name, pkg))
if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
@@ -1482,6 +1489,7 @@ python package_do_shlibs() {
use_ldconfig = False
needed = {}
+ needed_from = {}
shlib_provider = {}
read_shlib_providers()
@@ -1568,7 +1576,7 @@ python package_do_shlibs() {
if n in shlib_provider.keys():
(dep_pkg, ver_needed) = shlib_provider[n]
- bb.debug(2, '%s: Dependency %s requires package %s' % (pkg, n, dep_pkg))
+ bb.debug(2, '%s: Dependency %s requires package %s (used by files: %s)' % (pkg, n, dep_pkg, needed_from[n]))
if dep_pkg == pkg:
continue
@@ -1580,7 +1588,7 @@ python package_do_shlibs() {
if not dep in deps:
deps.append(dep)
else:
- bb.note("Couldn't find shared library provider for %s" % n)
+ bb.note("Couldn't find shared library provider for %s, used by files: %s" % (n, needed_from[n]))
deps_file = os.path.join(pkgdest, pkg + ".shlibdeps")
if os.path.exists(deps_file):