diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-30 15:55:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-01 14:29:31 +0100 |
commit | 91a164cb872d0c1f20d3a11c637c3a15fb1c8f77 (patch) | |
tree | 98ca4b91d3d6eeb4f0ec3e9244c64f2404bd3beb /bitbake/lib/bb/parse | |
parent | 044296ce4c40edb9b5584a5f4118882944b248f6 (diff) | |
download | poky-91a164cb872d0c1f20d3a11c637c3a15fb1c8f77.tar.gz |
bitbake: 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.
(Bitbake rev: 98d9e6e0f514a7cb7da1d99bf4bd5602b89426d6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 7 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index bf5ed05e7f..2303f15b9e 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
@@ -49,8 +49,11 @@ class ParseError(Exception): | |||
49 | else: | 49 | else: |
50 | return "ParseError in %s: %s" % (self.filename, self.msg) | 50 | return "ParseError in %s: %s" % (self.filename, self.msg) |
51 | 51 | ||
52 | class SkipPackage(Exception): | 52 | class SkipRecipe(Exception): |
53 | """Exception raised to skip this package""" | 53 | """Exception raised to skip this recipe""" |
54 | |||
55 | class SkipPackage(SkipRecipe): | ||
56 | """Exception raised to skip this recipe (use SkipRecipe in new code)""" | ||
54 | 57 | ||
55 | __mtime_cache = {} | 58 | __mtime_cache = {} |
56 | def cached_mtime(f): | 59 | def cached_mtime(f): |
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 30380a4bf6..4e5a06e761 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -386,7 +386,7 @@ def multi_finalize(fn, d): | |||
386 | d = bb.data.createCopy(safe_d) | 386 | d = bb.data.createCopy(safe_d) |
387 | try: | 387 | try: |
388 | finalize(fn, d) | 388 | finalize(fn, d) |
389 | except bb.parse.SkipPackage as e: | 389 | except bb.parse.SkipRecipe as e: |
390 | d.setVar("__SKIPPED", e.args[0]) | 390 | d.setVar("__SKIPPED", e.args[0]) |
391 | datastores = {"": safe_d} | 391 | datastores = {"": safe_d} |
392 | 392 | ||
@@ -429,7 +429,7 @@ def multi_finalize(fn, d): | |||
429 | verfunc(pv, d, safe_d) | 429 | verfunc(pv, d, safe_d) |
430 | try: | 430 | try: |
431 | finalize(fn, d) | 431 | finalize(fn, d) |
432 | except bb.parse.SkipPackage as e: | 432 | except bb.parse.SkipRecipe as e: |
433 | d.setVar("__SKIPPED", e.args[0]) | 433 | d.setVar("__SKIPPED", e.args[0]) |
434 | 434 | ||
435 | _create_variants(datastores, versions, verfunc, onlyfinalise) | 435 | _create_variants(datastores, versions, verfunc, onlyfinalise) |
@@ -469,7 +469,7 @@ def multi_finalize(fn, d): | |||
469 | try: | 469 | try: |
470 | if not onlyfinalise or variant in onlyfinalise: | 470 | if not onlyfinalise or variant in onlyfinalise: |
471 | finalize(fn, variant_d, variant) | 471 | finalize(fn, variant_d, variant) |
472 | except bb.parse.SkipPackage as e: | 472 | except bb.parse.SkipRecipe as e: |
473 | variant_d.setVar("__SKIPPED", e.args[0]) | 473 | variant_d.setVar("__SKIPPED", e.args[0]) |
474 | 474 | ||
475 | if len(datastores) > 1: | 475 | if len(datastores) > 1: |
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index a8627e9c07..9633340d1b 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -154,7 +154,7 @@ def handle(fn, d, include): | |||
154 | 154 | ||
155 | try: | 155 | try: |
156 | statements.eval(d) | 156 | statements.eval(d) |
157 | except bb.parse.SkipPackage: | 157 | except bb.parse.SkipRecipe: |
158 | bb.data.setVar("__SKIPPED", True, d) | 158 | bb.data.setVar("__SKIPPED", True, d) |
159 | if include == 0: | 159 | if include == 0: |
160 | return { "" : d } | 160 | return { "" : d } |