summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-08 11:17:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:32 +0000
commit2ff4ccb13f6046783cddb734ee98093721bb30cc (patch)
treeed6a40dab742cbd35c96f0676fb54d97415bf3f9 /bitbake/lib/bb/ui
parent16a81fb97a4dc538acb6bbffe9fcf11507445070 (diff)
downloadpoky-2ff4ccb13f6046783cddb734ee98093721bb30cc.tar.gz
bitbake: buildinfohelper: add provides info to the db
Added new entries to Provides model and link them to Recipe_Dependency using 'via' field. This data will be used by Toaster UI to show 'Provides:' information for the recipes. [YOCTO #6169] (Bitbake rev: 336ddc8df611d4c8f1c3d3a06d0a85bb544c38bc) 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>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index cba016528c..0cb6f684f9 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -41,7 +41,7 @@ from orm.models import Target_Image_File, BuildArtifact
41from orm.models import Variable, VariableHistory 41from orm.models import Variable, VariableHistory
42from orm.models import Package, Package_File, Target_Installed_Package, Target_File 42from orm.models import Package, Package_File, Target_Installed_Package, Target_File
43from orm.models import Task_Dependency, Package_Dependency 43from orm.models import Task_Dependency, Package_Dependency
44from orm.models import Recipe_Dependency 44from orm.models import Recipe_Dependency, Provides
45 45
46from orm.models import Project 46from orm.models import Project
47from bldcontrol.models import BuildEnvironment, BuildRequest 47from bldcontrol.models import BuildEnvironment, BuildRequest
@@ -1268,15 +1268,20 @@ class BuildInfoHelper(object):
1268 for dep in event._depgraph['depends'][recipe]: 1268 for dep in event._depgraph['depends'][recipe]:
1269 if dep in assume_provided: 1269 if dep in assume_provided:
1270 continue 1270 continue
1271 via = None
1271 if dep in event._depgraph['providermap']: 1272 if dep in event._depgraph['providermap']:
1272 dep = event._depgraph['providermap'][dep][0] 1273 deprecipe = event._depgraph['providermap'][dep][0]
1273 if dep in self.internal_state['recipes']: 1274 dependency = self.internal_state['recipes'][deprecipe]
1275 via = Provides.objects.get_or_create(name=dep,
1276 recipe=dependency)[0]
1277 elif dep in self.internal_state['recipes']:
1274 dependency = self.internal_state['recipes'][dep] 1278 dependency = self.internal_state['recipes'][dep]
1275 else: 1279 else:
1276 errormsg += " stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, dep) 1280 errormsg += " stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, dep)
1277 continue 1281 continue
1278 recipe_dep = Recipe_Dependency(recipe=target, 1282 recipe_dep = Recipe_Dependency(recipe=target,
1279 depends_on=dependency, 1283 depends_on=dependency,
1284 via=via,
1280 dep_type=Recipe_Dependency.TYPE_DEPENDS) 1285 dep_type=Recipe_Dependency.TYPE_DEPENDS)
1281 recipedeps_objects.append(recipe_dep) 1286 recipedeps_objects.append(recipe_dep)
1282 1287