aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 75f2261be8c..9ee7a590b65 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -297,3 +297,11 @@ def cut_path_prefix(fullpath, prefixes):
if fullpath.startswith(prefix):
return relpath(fullpath, prefix)
return fullpath
+
+
+@register.filter
+def for_target(package_dependencies, target):
+ """ filter the dependencies to be displayed by the supplied target
+ if no dependences are found for the target then return the predicted
+ dependences"""
+ return package_dependencies.for_target_or_none(target)