summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
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: