summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-02-05 11:18:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 13:29:21 +0000
commit40f6effec40ac6ca0ce96cf1776b0a459596b782 (patch)
tree7c0f95728a5143aa7338821a320345a68059912f /bitbake
parenta8ab1c6b25aac12215f44da9934cffcba62a34f2 (diff)
downloadpoky-40f6effec40ac6ca0ce96cf1776b0a459596b782.tar.gz
bitbake: toaster: models add all_depends method for Package_DependencyManager
This convenience method returns just the Package_Dependency for the package which are regular dependencies i.e. not RECOMMENDS or any other types. (Bitbake rev: bd76c22fe2aa06690b4ee25de69219ac0bf6b4d6) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 e9285d6438..7f7b1f37e9 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -787,6 +787,11 @@ class Package_DependencyManager(models.Manager):
787 """ 787 """
788 return self.all().aggregate(Sum('depends_on__size')) 788 return self.all().aggregate(Sum('depends_on__size'))
789 789
790 def all_depends(self):
791 """ Returns just the depends packages and not any other dep_type """
792 return self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |
793 Q(dep_type=Package_Dependency.TYPE_TRDEPENDS))
794
790class Package_Dependency(models.Model): 795class Package_Dependency(models.Model):
791 TYPE_RDEPENDS = 0 796 TYPE_RDEPENDS = 0
792 TYPE_TRDEPENDS = 1 797 TYPE_TRDEPENDS = 1