mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b22e345e05
commit
f305e95840
@@ -105,8 +105,20 @@ class RecipeInfo(namedtuple('RecipeInfo', recipe_fields)):
|
||||
def getvar(cls, var, metadata):
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user