Patchwork [bitbake-devel,2/4] bitbake-layers: show-cross-depends: ignore global inherits

login
register
mail settings
Submitter Paul Eggleton
Date May 23, 2014, 3:22 p.m.
Message ID <29701c5132760101bb6ccaf68d33a9354296db08.1400858501.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/72645/
State New
Headers show

Comments

Paul Eggleton - May 23, 2014, 3:22 p.m.
It's not particularly useful to show globally inherited classes here
since they do not normally represent a dependency.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bin/bitbake-layers | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/bin/bitbake-layers b/bin/bitbake-layers
index 826a3e7..326239a 100755
--- a/bin/bitbake-layers
+++ b/bin/bitbake-layers
@@ -596,6 +596,8 @@  The .bbappend file can impact the dependency.
         self.include_re = re.compile(r"include\s+(.+)")
         self.inherit_re = re.compile(r"inherit\s+(.+)")
 
+        global_inherit = (self.bbhandler.config_data.getVar('INHERIT', True) or "").split()
+
         # The bb's DEPENDS and RDEPENDS
         for f in pkg_fn:
             f = bb.cache.Cache.virtualfn2realfn(f)[0]
@@ -637,6 +639,9 @@  The .bbappend file can impact the dependency.
                     # The inherits' format is [classes/cls, /path/to/classes/cls]
                     # ignore the classes/cls.
                     if not cls_re.match(cls):
+                        classname = os.path.splitext(os.path.basename(cls))[0]
+                        if classname in global_inherit:
+                            continue
                         inherit_layername = self.get_file_layer(cls)
                         if inherit_layername != layername and not inherit_layername in ignore_layers:
                             if not options.show_filenames: