In the depths of time we were rather confused about naming. bb files
are recipes, the event to skip parsing them should be SkipRecipe,
not SkipPackage. This changes bitbake to use the better name but
leaves the other around for now. We can therefore start removing
references to it from the metadata.
(Bitbake rev:
98d9e6e0f514a7cb7da1d99bf4bd5602b89426d6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
comp = utils.better_compile(code, func, bbfile)
utils.better_exec(comp, {"d": d}, code, bbfile)
except:
- if sys.exc_info()[0] in (bb.parse.SkipPackage, bb.build.FuncFailed):
+ if sys.exc_info()[0] in (bb.parse.SkipRecipe, bb.build.FuncFailed):
raise
raise FuncFailed(func, None)
* Its mtime
* The mtimes of all its dependencies
- * Whether it caused a parse.SkipPackage exception
+ * Whether it caused a parse.SkipRecipe exception
Files causing parsing errors are evicted from the cache.
break
except ExpansionError:
raise
- except bb.parse.SkipPackage:
+ except bb.parse.SkipRecipe:
raise
except Exception as exc:
raise ExpansionError(varname, s, exc)
event.data = d
try:
ret = handler(event)
- except (bb.parse.SkipPackage, bb.BBHandledException):
+ except (bb.parse.SkipRecipe, bb.BBHandledException):
raise
except Exception:
etype, value, tb = sys.exc_info()
else:
return "ParseError in %s: %s" % (self.filename, self.msg)
-class SkipPackage(Exception):
- """Exception raised to skip this package"""
+class SkipRecipe(Exception):
+ """Exception raised to skip this recipe"""
+
+class SkipPackage(SkipRecipe):
+ """Exception raised to skip this recipe (use SkipRecipe in new code)"""
__mtime_cache = {}
def cached_mtime(f):
d = bb.data.createCopy(safe_d)
try:
finalize(fn, d)
- except bb.parse.SkipPackage as e:
+ except bb.parse.SkipRecipe as e:
d.setVar("__SKIPPED", e.args[0])
datastores = {"": safe_d}
verfunc(pv, d, safe_d)
try:
finalize(fn, d)
- except bb.parse.SkipPackage as e:
+ except bb.parse.SkipRecipe as e:
d.setVar("__SKIPPED", e.args[0])
_create_variants(datastores, versions, verfunc, onlyfinalise)
try:
if not onlyfinalise or variant in onlyfinalise:
finalize(fn, variant_d, variant)
- except bb.parse.SkipPackage as e:
+ except bb.parse.SkipRecipe as e:
variant_d.setVar("__SKIPPED", e.args[0])
if len(datastores) > 1:
try:
statements.eval(d)
- except bb.parse.SkipPackage:
+ except bb.parse.SkipRecipe:
bb.data.setVar("__SKIPPED", True, d)
if include == 0:
return { "" : d }
except Exception as e:
(t, value, tb) = sys.exc_info()
- if t in [bb.parse.SkipPackage, bb.build.FuncFailed]:
+ if t in [bb.parse.SkipRecipe, bb.build.FuncFailed]:
raise
try:
_print_exception(t, value, tb, realfile, text, context)