diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2014-01-28 15:26:11 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-29 17:38:50 +0000 |
| commit | 3f8f70bc1553842278fa5cd1a9150d1e64378205 (patch) | |
| tree | 12e30cfb2b2167ecd52eb7e9351d4680fcf45618 | |
| parent | ee045eeb38ffd191c314e362539a006ecc8c19f5 (diff) | |
| download | poky-3f8f70bc1553842278fa5cd1a9150d1e64378205.tar.gz | |
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
(From OE-Core rev: cf0696a39b811b13bb6e7dd06a2dad607e93a643)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/package.bbclass | 12 |
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() { | |||
| 1397 | if m: | 1397 | if m: |
| 1398 | if m.group(1) not in needed[pkg]: | 1398 | if m.group(1) not in needed[pkg]: |
| 1399 | needed[pkg].append(m.group(1)) | 1399 | needed[pkg].append(m.group(1)) |
| 1400 | if m.group(1) not in needed_from: | ||
| 1401 | needed_from[m.group(1)] = [] | ||
| 1402 | needed_from[m.group(1)].append(file) | ||
| 1400 | m = re.match("\s+SONAME\s+([^\s]*)", l) | 1403 | m = re.match("\s+SONAME\s+([^\s]*)", l) |
| 1401 | if m: | 1404 | if m: |
| 1402 | this_soname = m.group(1) | 1405 | this_soname = m.group(1) |
| @@ -1469,6 +1472,10 @@ python package_do_shlibs() { | |||
| 1469 | needed[pkg] = [] | 1472 | needed[pkg] = [] |
| 1470 | if name and name not in needed[pkg]: | 1473 | if name and name not in needed[pkg]: |
| 1471 | needed[pkg].append(name) | 1474 | needed[pkg].append(name) |
| 1475 | if name not in needed_from: | ||
| 1476 | needed_from[name] = [] | ||
| 1477 | if lafile and lafile not in needed_from[name]: | ||
| 1478 | needed_from[name].append(lafile) | ||
| 1472 | #bb.note("Adding %s for %s" % (name, pkg)) | 1479 | #bb.note("Adding %s for %s" % (name, pkg)) |
| 1473 | 1480 | ||
| 1474 | if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1": | 1481 | if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1": |
| @@ -1482,6 +1489,7 @@ python package_do_shlibs() { | |||
| 1482 | use_ldconfig = False | 1489 | use_ldconfig = False |
| 1483 | 1490 | ||
| 1484 | needed = {} | 1491 | needed = {} |
| 1492 | needed_from = {} | ||
| 1485 | shlib_provider = {} | 1493 | shlib_provider = {} |
| 1486 | read_shlib_providers() | 1494 | read_shlib_providers() |
| 1487 | 1495 | ||
| @@ -1568,7 +1576,7 @@ python package_do_shlibs() { | |||
| 1568 | if n in shlib_provider.keys(): | 1576 | if n in shlib_provider.keys(): |
| 1569 | (dep_pkg, ver_needed) = shlib_provider[n] | 1577 | (dep_pkg, ver_needed) = shlib_provider[n] |
| 1570 | 1578 | ||
| 1571 | bb.debug(2, '%s: Dependency %s requires package %s' % (pkg, n, dep_pkg)) | 1579 | bb.debug(2, '%s: Dependency %s requires package %s (used by files: %s)' % (pkg, n, dep_pkg, needed_from[n])) |
| 1572 | 1580 | ||
| 1573 | if dep_pkg == pkg: | 1581 | if dep_pkg == pkg: |
| 1574 | continue | 1582 | continue |
| @@ -1580,7 +1588,7 @@ python package_do_shlibs() { | |||
| 1580 | if not dep in deps: | 1588 | if not dep in deps: |
| 1581 | deps.append(dep) | 1589 | deps.append(dep) |
| 1582 | else: | 1590 | else: |
| 1583 | bb.note("Couldn't find shared library provider for %s" % n) | 1591 | bb.note("Couldn't find shared library provider for %s, used by files: %s" % (n, needed_from[n])) |
| 1584 | 1592 | ||
| 1585 | deps_file = os.path.join(pkgdest, pkg + ".shlibdeps") | 1593 | deps_file = os.path.join(pkgdest, pkg + ".shlibdeps") |
| 1586 | if os.path.exists(deps_file): | 1594 | if os.path.exists(deps_file): |
