summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-08-16 03:26:23 +0200
committerDan McGee <dan@archlinux.org>2012-08-16 03:26:26 +0200
commit04066d190efddaf890d8573a3fbf4fd1706cb51f (patch)
treed5bcfde0700e72f34f19e63c90a3cbff0f46a6b2
parent2e9094630b5117575f899f068046c6e1021387a1 (diff)
downloadarchweb-04066d190efddaf890d8573a3fbf4fd1706cb51f.tar.gz
archweb-04066d190efddaf890d8573a3fbf4fd1706cb51f.tar.xz
Ensure reverse conflicts match architecture if applicable
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--main/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index 95e3c42..202e7fa 100644
--- a/main/models.py
+++ b/main/models.py
@@ -291,6 +291,10 @@ class Package(models.Model):
Returns a list of packages with conflicts against this package.
"""
pkgs = Package.objects.filter(conflicts__name=self.pkgname)
+ if not self.arch.agnostic:
+ # make sure we match architectures if possible
+ pkgs = pkgs.filter(arch__in=self.applicable_arches())
+
alpm = AlpmAPI()
if not alpm.available:
return pkgs