aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'layerindex/views.py')
-rw-r--r--layerindex/views.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/layerindex/views.py b/layerindex/views.py
index 4b0afabf7a..0ea794e793 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -656,8 +656,15 @@ class RecipeDetailView(DetailView):
context = super(RecipeDetailView, self).get_context_data(**kwargs)
recipe = self.get_object()
if recipe:
- appendprefix = "%s_" % recipe.pn
- context['appends'] = BBAppend.objects.filter(layerbranch__branch=recipe.layerbranch.branch).filter(filename__startswith=appendprefix)
+ verappendprefix = recipe.filename.split('.bb')[0]
+ appendprefix = verappendprefix.split('_')[0]
+ #context['verappends'] = BBAppend.objects.filter(layerbranch__branch=recipe.layerbranch.branch).filter(filename='%s.bbappend' % verappendprefix)
+ context['appends'] = BBAppend.objects.filter(layerbranch__branch=recipe.layerbranch.branch).filter(filename__regex=r'%s(_[^_]*)?\.bbappend' % appendprefix)
+ verappends = []
+ for append in context['appends']:
+ if append.matches_recipe(recipe):
+ verappends.append(append)
+ context['verappends'] = verappends
return context