Skip to content

Commit

Permalink
do not bail out on SkipPackage exceptions
Browse files Browse the repository at this point in the history
set __SKIPPED instead of
  • Loading branch information
ensc committed Dec 10, 2012
1 parent edbd62a commit fe0093b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/bb/data_smart.py
Expand Up @@ -141,6 +141,8 @@ def expandWithRefs(self, s, varname):
s = __expand_python_regexp__.sub(varparse.python_sub, s)
if s == olds:
break
except bb.parse.SkipPackage:
raise
except ExpansionError:
raise
except Exception as exc:
Expand Down
10 changes: 9 additions & 1 deletion lib/bb/parse/parse_py/BBHandler.py
Expand Up @@ -148,10 +148,18 @@ def handle(fn, d, include):
if ext != ".bbclass":
data.setVar('FILE', abs_fn, d)

statements.eval(d)
try:
statements.eval(d)
except bb.parse.SkipPackage:
bb.data.setVar("__SKIPPED", True, d)

if ext == ".bbclass":
classes.remove(__classname__)
elif bb.data.getVar("__SKIPPED", d, True):
if include == 0:
return { "" : d }
else:
return d
else:
if include == 0:
return ast.multi_finalize(fn, d)
Expand Down

0 comments on commit fe0093b

Please sign in to comment.