summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2010-03-01 18:45:15 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2010-03-22 15:03:21 +0000
commit2f9e15afbe988a76b9581093b8bd469e275a0b9e (patch)
tree067825e2bfeb0d9377a80e02274de9b92575ce10 /bitbake/lib/bb
parent57044b9a6240235a403eac4067e2e2113e03b6eb (diff)
downloadpoky-2f9e15afbe988a76b9581093b8bd469e275a0b9e.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py30
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 ea3478ce3a..4641c13d9c 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):
152 classes.remove(__classname__) 152 classes.remove(__classname__)
153 else: 153 else:
154 if include == 0: 154 if include == 0:
155 if data.getVar('BBCLASSEXTEND', d, 1): 155 safe_d = d
156 based = bb.data.createCopy(d) 156 d = bb.data.createCopy(safe_d)
157 else:
158 based = d
159 try: 157 try:
160 ast.finalise(fn, based) 158 ast.finalise(fn, d)
161 except bb.parse.SkipPackage: 159 except bb.parse.SkipPackage:
162 bb.data.setVar("__SKIPPED", True, based) 160 bb.data.setVar("__SKIPPED", True, d)
163 darray = {"": based} 161 darray = {"": d}
164 162
165 for cls in (data.getVar('BBCLASSEXTEND', based, 1) or "").split(): 163 extended = bb.data.getVar("BBCLASSEXTEND", d, True)
164 if extended:
165 bb.data.setVar("BBCLASSEXTEND", extended, safe_d)
166
167 for cls in (extended or "").split():
166 pn = data.getVar('PN', d, True) 168 pn = data.getVar('PN', d, True)
167 based = bb.data.createCopy(d) 169 variant_d = bb.data.createCopy(safe_d)
168 data.setVar('PN', pn + '-' + cls, based) 170 data.setVar('PN', pn + '-' + cls, variant_d)
169 inherit([cls], based) 171 inherit([cls], variant_d)
170 try: 172 try:
171 ast.finalise(fn, based) 173 ast.finalise(fn, variant_d)
172 except bb.parse.SkipPackage: 174 except bb.parse.SkipPackage:
173 bb.data.setVar("__SKIPPED", True, based) 175 bb.data.setVar("__SKIPPED", True, variant_d)
174 darray[cls] = based 176 darray[cls] = variant_d
175 return darray 177 return darray
176 178
177 if oldfile: 179 if oldfile: