From: Alex Franco <alejandro.fra...@linux.intel.com> Recipe search cannot be narrowed to a specific layer, producing unnecessary results.
This change allows including a layers name when searching for recipes to narrow the yielded results by adding a layer name to the simplesearch.getquery call in the recipe search view. [YOCTO #6618] Signed-off-by: Jose Lamego <jose.a.lam...@linux.intel.com> --- layerindex/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layerindex/views.py b/layerindex/views.py index 03fadbb..5db6fbc 100644 --- a/layerindex/views.py +++ b/layerindex/views.py @@ -406,7 +406,8 @@ class RecipeSearchView(ListView): qs0 = init_qs.filter(pn=query_string).order_by(*order_by) qs0 = recipes_preferred_count(qs0) - entry_query = simplesearch.get_query(query_string, ['pn']) + entry_query = simplesearch.get_query( + query_string, ['pn', 'layerbranch__layer__name']) qs1 = init_qs.filter(entry_query).order_by(*order_by) qs1 = recipes_preferred_count(qs1) -- 1.9.1 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto