diff options
-rw-r--r-- | main/models.py | 4 | ||||
-rw-r--r-- | templates/packages/details.html | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/main/models.py b/main/models.py index e0681ab..1efca78 100644 --- a/main/models.py +++ b/main/models.py @@ -234,9 +234,11 @@ class Package(models.Model): list slim by including the corresponding package in the same testing category as this package if that check makes sense. """ + provides = set(self.provides.values_list('name', flat=True)) + provides.add(self.pkgname) requiredby = PackageDepend.objects.select_related('pkg', 'pkg__arch', 'pkg__repo').filter( - depname=self.pkgname).order_by( + depname__in=provides).order_by( 'pkg__pkgname', 'pkg__arch__name', 'pkg__repo__name') if not self.arch.agnostic: # make sure we match architectures if possible diff --git a/templates/packages/details.html b/templates/packages/details.html index 8be408f..1016b43 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -203,6 +203,7 @@ <ul> {% for req in rqdby %} <li>{% pkg_details_link req.pkg %} + {% if req.depname != pkg.pkgname %}<span class="virtual-dep">(requires {{ req.depname }})</span>{% endif %} {% if req.pkg.repo.testing %}<span class="testing-dep">(testing)</span>{% endif %} {% if req.optional %}<span class="opt-dep">(optional)</span>{% endif %} </li> |