summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-03-07 09:47:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-21 17:51:25 +0000
commit0bdb38820489a69448e36c75863e2e2d47cdb20f (patch)
tree4ce003a466f309638b0dcaf57ac3fca3000f3807 /meta/lib
parent1958b303f98b8db5bab00344823bbb8e086b8dba (diff)
downloadopenembedded-core-0bdb38820489a69448e36c75863e2e2d47cdb20f.tar.gz
openembedded-core-0bdb38820489a69448e36c75863e2e2d47cdb20f.tar.bz2
openembedded-core-0bdb38820489a69448e36c75863e2e2d47cdb20f.tar.xz
openembedded-core-0bdb38820489a69448e36c75863e2e2d47cdb20f.zip
oe.utils: add inherits (sync from OE)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 69f9384dc..f6d4142c1 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -80,3 +80,7 @@ def param_bool(cfg, field, dflt = None):
elif strvalue in ('no', 'n', 'false', 'f', '0'):
return False
raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value))
+
+def inherits(d, *classes):
+ """Return True if the metadata inherits any of the specified classes"""
+ return any(bb.data.inherits_class(cls, d) for cls in classes)