summaryrefslogtreecommitdiffstats
path: root/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-11 00:02:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-11 15:59:28 +0000
commitf3a71e509af196391ec126d079cf1bd178e62ad5 (patch)
treeb3497729bb3ec952296a38e4375d1324fe204961 /lib/bb/data.py
parent9fc98f96f0e0320beda0ce9546275a99336732c1 (diff)
downloadbitbake-contrib-f3a71e509af196391ec126d079cf1bd178e62ad5.tar.gz
BBhandler/data: Fix __inherit_cache duplication
The inherits cache contains duplicate entries, some with the full patch, some just starting classes/xxx. This is a waste of parse time and potentially error prone. This patch fixes various pieces of code so the absolute paths are always preferred and work correctly. The inherits_class function did not work with full paths so the patch fixes this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r--lib/bb/data.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index 9a32353d6..dc5a425d1 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -357,6 +357,8 @@ def generate_dependencies(d):
def inherits_class(klass, d):
val = getVar('__inherit_cache', d) or []
- if os.path.join('classes', '%s.bbclass' % klass) in val:
- return True
+ needle = os.path.join('classes', '%s.bbclass' % klass)
+ for v in val:
+ if v.endswith(needle):
+ return True
return False