mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs: handle dependency field differences
The old RRS branch had its own addition of dependency support, but in the mean time we added that to the layer index in the master branch using a different structure. Adapt the RRS recipe detail page to that structure. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
b2a67d718c
commit
ea6270f386
|
@ -388,6 +388,9 @@ class PackageConfig(models.Model):
|
|||
def __str__(self):
|
||||
return "%s - %s" % (self.recipe, self.feature)
|
||||
|
||||
def get_deps_list(self):
|
||||
return self.build_deps.split()
|
||||
|
||||
class StaticBuildDep(models.Model):
|
||||
recipes = models.ManyToManyField(Recipe)
|
||||
name = models.CharField(max_length=255)
|
||||
|
|
|
@ -10,7 +10,7 @@ from django.views.generic import ListView, DetailView, RedirectView
|
|||
from django.core.urlresolvers import resolve, reverse, reverse_lazy
|
||||
from django.db import connection
|
||||
|
||||
from layerindex.models import Recipe
|
||||
from layerindex.models import Recipe, StaticBuildDep
|
||||
from rrs.models import Release, Milestone, Maintainer, RecipeMaintainerHistory, \
|
||||
RecipeMaintainer, RecipeUpstreamHistory, RecipeUpstream, \
|
||||
RecipeDistro, RecipeUpgrade, MaintenancePlan
|
||||
|
@ -711,9 +711,7 @@ class RecipeDetailView(DetailView):
|
|||
for p in recipe.provides.split():
|
||||
context['recipe_provides'].append(p)
|
||||
|
||||
context['recipe_depends'] = []
|
||||
for d in recipe.depends.split():
|
||||
context['recipe_depends'].append(d)
|
||||
context['recipe_depends'] = StaticBuildDep.objects.filter(recipes__id=recipe.id).values_list('name', flat=True)
|
||||
|
||||
context['recipe_distros'] = RecipeDistro.get_distros_by_recipe(recipe)
|
||||
|
||||
|
|
|
@ -156,13 +156,18 @@
|
|||
</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if recipe_depends %}
|
||||
{% if recipe_depends or recipe.packageconfig_set %}
|
||||
<dt>Depends</dt>
|
||||
<dd>
|
||||
<ul class="unstyled">
|
||||
{% for d in recipe_depends %}
|
||||
<li>{{ d }}</li>
|
||||
{% endfor %}
|
||||
{% for pkc in recipe.packageconfig_set.all %}
|
||||
{% for dep in pkc.get_deps_list %}
|
||||
<li>{{ dep }} (optional)</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user