aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/views.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-03-09 19:48:35 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2014-03-09 20:58:24 +0000
commitcd26148eed9cfd27ec42835e4ca54871c0c2bf24 (patch)
treec7ed87541a21071e92f5de3537cfccf494634ce9 /layerindex/views.py
parent4db9555a67c3a2c72849d1de1b5fb8daac06111a (diff)
downloadopenembedded-core-contrib-cd26148eed9cfd27ec42835e4ca54871c0c2bf24.tar.gz
Fix append list name matching
* Recipes without versions in the file name (such as alsa-state.bb) weren't having their bbappends listed. Use a regex match to fix this. * Use the prefix from the filename instead of PN, since that's how BitBake does it * List version matching bbappends first, then non-matching in muted colour Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
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