bitbake: buildinfohelper: use providermap
Used providermap in store_dependency_information function to find virtual dependencies. This should fix annoying warnings "stpd: KeyError saving recipe dependency" [YOCTO #6169] (Bitbake rev: 85c416ca338c886db6e79651e44727482df9fb07) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f2b7252190
commit
6a28ed33b7
|
@ -1186,6 +1186,7 @@ class BuildInfoHelper(object):
|
||||||
assert 'layer-priorities' in event._depgraph
|
assert 'layer-priorities' in event._depgraph
|
||||||
assert 'pn' in event._depgraph
|
assert 'pn' in event._depgraph
|
||||||
assert 'tdepends' in event._depgraph
|
assert 'tdepends' in event._depgraph
|
||||||
|
assert 'providermap' in event._depgraph
|
||||||
|
|
||||||
errormsg = ""
|
errormsg = ""
|
||||||
|
|
||||||
|
@ -1263,15 +1264,22 @@ class BuildInfoHelper(object):
|
||||||
# buildtime
|
# buildtime
|
||||||
recipedeps_objects = []
|
recipedeps_objects = []
|
||||||
for recipe in event._depgraph['depends']:
|
for recipe in event._depgraph['depends']:
|
||||||
try:
|
|
||||||
target = self.internal_state['recipes'][recipe]
|
target = self.internal_state['recipes'][recipe]
|
||||||
for dep in event._depgraph['depends'][recipe]:
|
for dep in event._depgraph['depends'][recipe]:
|
||||||
|
if dep in assume_provided:
|
||||||
|
continue
|
||||||
|
if dep in event._depgraph['providermap']:
|
||||||
|
dep = event._depgraph['providermap'][dep][0]
|
||||||
|
if dep in self.internal_state['recipes']:
|
||||||
dependency = self.internal_state['recipes'][dep]
|
dependency = self.internal_state['recipes'][dep]
|
||||||
recipedeps_objects.append(Recipe_Dependency( recipe = target,
|
else:
|
||||||
depends_on = dependency, dep_type = Recipe_Dependency.TYPE_DEPENDS))
|
errormsg += " stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, dep)
|
||||||
except KeyError as e:
|
continue
|
||||||
if e not in assume_provided and not str(e).startswith("virtual/"):
|
recipe_dep = Recipe_Dependency(recipe=target,
|
||||||
errormsg += " stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, e)
|
depends_on=dependency,
|
||||||
|
dep_type=Recipe_Dependency.TYPE_DEPENDS)
|
||||||
|
recipedeps_objects.append(recipe_dep)
|
||||||
|
|
||||||
Recipe_Dependency.objects.bulk_create(recipedeps_objects)
|
Recipe_Dependency.objects.bulk_create(recipedeps_objects)
|
||||||
|
|
||||||
# save all task information
|
# save all task information
|
||||||
|
|
Loading…
Reference in New Issue