diff options
author | Chris Larson <clarson@kergoth.com> | 2010-03-01 18:45:15 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-22 15:03:21 +0000 |
commit | 2f9e15afbe988a76b9581093b8bd469e275a0b9e (patch) | |
tree | 067825e2bfeb0d9377a80e02274de9b92575ce10 | |
parent | 57044b9a6240235a403eac4067e2e2113e03b6eb (diff) | |
download | openembedded-core-2f9e15afbe988a76b9581093b8bd469e275a0b9e.tar.gz openembedded-core-2f9e15afbe988a76b9581093b8bd469e275a0b9e.tar.bz2 openembedded-core-2f9e15afbe988a76b9581093b8bd469e275a0b9e.tar.xz openembedded-core-2f9e15afbe988a76b9581093b8bd469e275a0b9e.zip |
Fix issues with BBCLASSEXTEND set by anonymous python, and rename some variables to improve code clarity
(Bitbake rev: 3062e96181fe845cfd286990b0216888ddd3d228)
Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index ea3478ce3..4641c13d9 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -152,26 +152,28 @@ def handle(fn, d, include): classes.remove(__classname__) else: if include == 0: - if data.getVar('BBCLASSEXTEND', d, 1): - based = bb.data.createCopy(d) - else: - based = d + safe_d = d + d = bb.data.createCopy(safe_d) try: - ast.finalise(fn, based) + ast.finalise(fn, d) except bb.parse.SkipPackage: - bb.data.setVar("__SKIPPED", True, based) - darray = {"": based} + bb.data.setVar("__SKIPPED", True, d) + darray = {"": d} - for cls in (data.getVar('BBCLASSEXTEND', based, 1) or "").split(): + extended = bb.data.getVar("BBCLASSEXTEND", d, True) + if extended: + bb.data.setVar("BBCLASSEXTEND", extended, safe_d) + + for cls in (extended or "").split(): pn = data.getVar('PN', d, True) - based = bb.data.createCopy(d) - data.setVar('PN', pn + '-' + cls, based) - inherit([cls], based) + variant_d = bb.data.createCopy(safe_d) + data.setVar('PN', pn + '-' + cls, variant_d) + inherit([cls], variant_d) try: - ast.finalise(fn, based) + ast.finalise(fn, variant_d) except bb.parse.SkipPackage: - bb.data.setVar("__SKIPPED", True, based) - darray[cls] = based + bb.data.setVar("__SKIPPED", True, variant_d) + darray[cls] = variant_d return darray if oldfile: |