summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-05-26 16:12:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 08:35:04 +0100
commitdd764003ea2cb9449f838146183f17873a902e48 (patch)
treea0824c31ae2049a1784d91a8e1d7fe8735e3c6b7 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py
parent89433a35e6e21a978cef3e41e24d87024ed9a6ed (diff)
downloadpoky-dd764003ea2cb9449f838146183f17873a902e48.tar.gz
bitbake: toaster: Rework displaying package dependencies across Toaster
After porting the build table to a unified mechanism for showing dependencies in tables it highlighted that the dependencies selected to be shown were un-filtered. i.e. all dependencies from all contexts were shown. The context for a package's dependencies is based on the target that they were installed onto, or if not installed then a "None" target. Depending on where the template for the dependencies are show we need to switch this target which is why a filter and utility function on the model is added. Additionally to use the same templates in the build analysis we also need to optionally add links to the build data for the packages being displayed as dependencies. Customising a Custom image recipes may or may not have a target depending on whether they have been built or not, if not we do a best effort at getting the dependencies by using the last known target on that package to get the dependency information. [YOCTO #9676] (Bitbake rev: 31e7c26cc31a7c8c78c1464fa01581683bfd2965) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 1d680365ad..119311db93 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):
297 if fullpath.startswith(prefix): 297 if fullpath.startswith(prefix):
298 return relpath(fullpath, prefix) 298 return relpath(fullpath, prefix)
299 return fullpath 299 return fullpath
300
301
302@register.filter
303def for_target(package_dependencies, target):
304 """ filter the dependencies to be displayed by the supplied target
305 if no dependences are found for the target then return the predicted
306 dependences"""
307 return package_dependencies.for_target_or_none(target)