aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-30 15:55:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-30 16:31:23 +0100
commit98d9e6e0f514a7cb7da1d99bf4bd5602b89426d6 (patch)
treecac235bd6659429a5feb17dd3e4a9872ba23ee77 /lib/bb
parentf63b61f8997862439519f474cc09f3e05e95288c (diff)
downloadbitbake-98d9e6e0f514a7cb7da1d99bf4bd5602b89426d6.tar.gz
event: Add SkipRecipe event to replace SkipPackage
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/build.py2
-rw-r--r--lib/bb/cache.py2
-rw-r--r--lib/bb/data_smart.py2
-rw-r--r--lib/bb/event.py2
-rw-r--r--lib/bb/parse/__init__.py7
-rw-r--r--lib/bb/parse/ast.py6
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py2
-rw-r--r--lib/bb/utils.py2
8 files changed, 14 insertions, 11 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 5cb4c06a8..98ee36ce5 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -243,7 +243,7 @@ def exec_func_python(func, d, runfile, cwd=None):
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)
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 431fc079e..38e91480b 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -692,7 +692,7 @@ def init(cooker):
* 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.
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 707029de9..3d773b1d6 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -334,7 +334,7 @@ class DataSmart(MutableMapping):
break
except ExpansionError:
raise
- except bb.parse.SkipPackage:
+ except bb.parse.SkipRecipe:
raise
except Exception as exc:
raise ExpansionError(varname, s, exc)
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 05ff5434a..8b47ae595 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -72,7 +72,7 @@ def execute_handler(name, handler, event, d):
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()
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index bf5ed05e7..2303f15b9 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -49,8 +49,11 @@ class ParseError(Exception):
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):
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py
index 30380a4bf..4e5a06e76 100644
--- a/lib/bb/parse/ast.py
+++ b/lib/bb/parse/ast.py
@@ -386,7 +386,7 @@ def multi_finalize(fn, d):
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}
@@ -429,7 +429,7 @@ def multi_finalize(fn, 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)
@@ -469,7 +469,7 @@ def multi_finalize(fn, d):
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:
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index a8627e9c0..9633340d1 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -154,7 +154,7 @@ def handle(fn, d, include):
try:
statements.eval(d)
- except bb.parse.SkipPackage:
+ except bb.parse.SkipRecipe:
bb.data.setVar("__SKIPPED", True, d)
if include == 0:
return { "" : d }
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index ead5f366b..c179394dc 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -362,7 +362,7 @@ def better_exec(code, context, text = None, realfile = "<code>"):
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)