diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-02-10 14:26:12 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-09 12:23:57 -0700 |
commit | 6fc246232aeacfacdf5e873e84be1485ce2c22e0 (patch) | |
tree | 902303187732942653c5cf1f6ab5e2f7291be6a9 /bitbake/lib | |
parent | 3d0bb418a08aa96dd57c15b695385775ce3bddc8 (diff) | |
download | poky-6fc246232aeacfacdf5e873e84be1485ce2c22e0.tar.gz |
bitbake: toaster: mark dependency packages
We need to mark the package entries that are
created solely for dependency tracking purposes.
In order to avoid altering the database schema,
we mark the dependency targets with size = -1, since
this is not a valid size anyway and makes for easy
filtering.
[YOCTO #5803]
(Bitbake rev: d11ed273dd6c520b16e9ccfe79476f340006a55d)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/views.py | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 4c9c96b1bc..a0f10952f0 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -239,7 +239,11 @@ class ORMWrapper(object): | |||
239 | size = package_info['FILES_INFO'][path] ) | 239 | size = package_info['FILES_INFO'][path] ) |
240 | 240 | ||
241 | def _po_byname(p): | 241 | def _po_byname(p): |
242 | return Package.objects.get_or_create(build = build_obj, name = p)[0] | 242 | pkg, created = Package.objects.get_or_create(build = build_obj, name = p) |
243 | if created: | ||
244 | pkg.size = -1 | ||
245 | pkg.save() | ||
246 | return pkg | ||
243 | 247 | ||
244 | # save soft dependency information | 248 | # save soft dependency information |
245 | if 'RDEPENDS' in package_info and package_info['RDEPENDS']: | 249 | if 'RDEPENDS' in package_info and package_info['RDEPENDS']: |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 2b06e2136b..c786df41fc 100644 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -366,7 +366,7 @@ def recipe(request, build_id, recipe_id): | |||
366 | layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0] | 366 | layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0] |
367 | layer = Layer.objects.filter(pk=layer_version.layer_id)[0] | 367 | layer = Layer.objects.filter(pk=layer_version.layer_id)[0] |
368 | tasks = Task.objects.filter(recipe_id = recipe_id).filter(build_id = build_id) | 368 | tasks = Task.objects.filter(recipe_id = recipe_id).filter(build_id = build_id) |
369 | packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id) | 369 | packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id).filter(size__gte=0) |
370 | 370 | ||
371 | context = { | 371 | context = { |
372 | 'build' : Build.objects.filter(pk=build_id)[0], | 372 | 'build' : Build.objects.filter(pk=build_id)[0], |
@@ -725,7 +725,7 @@ def bpackage(request, build_id): | |||
725 | if retval: | 725 | if retval: |
726 | return _redirect_parameters( 'packages', request.GET, mandatory_parameters, build_id = build_id) | 726 | return _redirect_parameters( 'packages', request.GET, mandatory_parameters, build_id = build_id) |
727 | (filter_string, search_term, ordering_string) = _search_tuple(request, Package) | 727 | (filter_string, search_term, ordering_string) = _search_tuple(request, Package) |
728 | queryset = Package.objects.filter(build = build_id) | 728 | queryset = Package.objects.filter(build = build_id).filter(size__gte=0) |
729 | queryset = _get_queryset(Package, queryset, filter_string, search_term, ordering_string) | 729 | queryset = _get_queryset(Package, queryset, filter_string, search_term, ordering_string) |
730 | 730 | ||
731 | packages = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1)) | 731 | packages = _build_page_range(Paginator(queryset, request.GET.get('count', 100)),request.GET.get('page', 1)) |