summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-01-07 08:38:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 13:24:03 +0000
commitf305e95840a887bbd97e9003e7a0f9135df77fcb (patch)
tree4097812a83b4b34d7e056260ca16a1c6457988f7 /bitbake
parentb22e345e05efcc3f66278af8f09fb083afe32b68 (diff)
downloadopenembedded-core-f305e95840a887bbd97e9003e7a0f9135df77fcb.tar.gz
openembedded-core-f305e95840a887bbd97e9003e7a0f9135df77fcb.tar.bz2
openembedded-core-f305e95840a887bbd97e9003e7a0f9135df77fcb.zip
cache: don't expand variables for skipped recipes
Errors can result from these expansions, but for skipped recipes, we shouldn't care about those failures. This fixes the same issue which Richard Purdie fixed in poky, commit 847b717. (Bitbake rev: 96ee6840010c1ae1080e6bf7ff0f4eb2d361e84b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index cde136083a..9a2e2d5298 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -106,7 +106,19 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
return metadata.getVar(var, True) or ''
@classmethod
+ def make_optional(cls, default=None, **kwargs):
+ """Construct the namedtuple from the specified keyword arguments,
+ with every value considered optional, using the default value if
+ it was not specified."""
+ for field in cls._fields:
+ kwargs[field] = kwargs.get(field, default)
+ return cls(**kwargs)
+
+ @classmethod
def from_metadata(cls, filename, metadata):
+ if cls.getvar('__SKIPPED', metadata):
+ return cls.make_optional(skipped=True)
+
tasks = metadata.getVar('__BBTASKS', False)
pn = cls.getvar('PN', metadata)
@@ -114,15 +126,6 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
if not pn in packages:
packages.append(pn)
- skip = cls.getvar('__SKIPPED', metadata)
- if skip:
- return RecipeInfo(None, None, None, None, None,
- None, None, None, None, None,
- None, skip, None, None, None,
- None, None, None, None, None,
- None, None, None, None, None,
- None, None)
-
return RecipeInfo(
tasks = tasks,
basetaskhashes = cls.taskvar('BB_BASEHASH', tasks, metadata),
@@ -133,7 +136,7 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
{'tasks': [], 'parents': {}},
variants = cls.listvar('__VARIANTS', metadata) + [''],
- skipped = skip,
+ skipped = False,
timestamp = bb.parse.cached_mtime(filename),
packages = cls.listvar('PACKAGES', metadata),
pn = pn,