summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-08 11:17:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:32 +0000
commit16a81fb97a4dc538acb6bbffe9fcf11507445070 (patch)
tree3d12297276a85d6624a43c487ca4d35ac216e701 /bitbake/lib/toaster/orm/models.py
parent6a28ed33b7baefe0ccf1be3d924188bbb8a5f86f (diff)
downloadpoky-16a81fb97a4dc538acb6bbffe9fcf11507445070.tar.gz
bitbake: toaster: add Provider model
Added new model Provider and a foreign key 'via' to link Recipe_Dependency to it. [YOCTO #6169] (Bitbake rev: e45fff6314741d46e2549b2f72ed380cbbb95593) 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/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 6e87c54476..e4ab0bbc49 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -733,6 +733,10 @@ class Recipe_DependencyManager(models.Manager):
733 def get_queryset(self): 733 def get_queryset(self):
734 return super(Recipe_DependencyManager, self).get_queryset().exclude(recipe_id = F('depends_on__id')) 734 return super(Recipe_DependencyManager, self).get_queryset().exclude(recipe_id = F('depends_on__id'))
735 735
736class Provides(models.Model):
737 name = models.CharField(max_length=100)
738 recipe = models.ForeignKey(Recipe)
739
736class Recipe_Dependency(models.Model): 740class Recipe_Dependency(models.Model):
737 TYPE_DEPENDS = 0 741 TYPE_DEPENDS = 0
738 TYPE_RDEPENDS = 1 742 TYPE_RDEPENDS = 1
@@ -743,6 +747,7 @@ class Recipe_Dependency(models.Model):
743 ) 747 )
744 recipe = models.ForeignKey(Recipe, related_name='r_dependencies_recipe') 748 recipe = models.ForeignKey(Recipe, related_name='r_dependencies_recipe')
745 depends_on = models.ForeignKey(Recipe, related_name='r_dependencies_depends') 749 depends_on = models.ForeignKey(Recipe, related_name='r_dependencies_depends')
750 via = models.ForeignKey(Provides, null=True, default=None)
746 dep_type = models.IntegerField(choices=DEPENDS_TYPE) 751 dep_type = models.IntegerField(choices=DEPENDS_TYPE)
747 objects = Recipe_DependencyManager() 752 objects = Recipe_DependencyManager()
748 753