summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-01 14:43:54 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-03 16:25:20 +0000
commitade351e2f4c3693d4c2ecf3891899c2dcd082491 (patch)
tree5087685a70305a6d7792f2e622fca7654b6d0ced /bitbake/lib/bb/parse
parent28fd9dadbdf842d5db32e893be85068f9b2b114a (diff)
downloadopenembedded-core-ade351e2f4c3693d4c2ecf3891899c2dcd082491.tar.gz
openembedded-core-ade351e2f4c3693d4c2ecf3891899c2dcd082491.tar.bz2
openembedded-core-ade351e2f4c3693d4c2ecf3891899c2dcd082491.tar.xz
openembedded-core-ade351e2f4c3693d4c2ecf3891899c2dcd082491.zip
bitbake: Add in code to support the BBCLASSEXTEND variable. Virtual native/sdk recipes then become possible
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 3a309aed6..97786c420 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -181,7 +181,21 @@ def handle(fn, d, include = 0):
classes.remove(__classname__)
else:
if include == 0:
- finalise(fn, d)
+ multi = data.getVar('BBCLASSEXTEND', d, 1)
+ if multi:
+ based = bb.data.createCopy(d)
+ finalise(fn, based)
+ darray = {"": based}
+ for cls in multi.split():
+ pn = data.getVar('PN', d, True)
+ based = bb.data.createCopy(d)
+ data.setVar('PN', pn + '-' + cls, based)
+ inherit([cls], based)
+ finalise(fn, based)
+ darray[cls] = based
+ return darray
+ else:
+ finalise(fn, d)
bbpath.pop(0)
if oldfile:
bb.data.setVar("FILE", oldfile, d)