summaryrefslogtreecommitdiff
path: root/packages/views
diff options
context:
space:
mode:
Diffstat (limited to 'packages/views')
-rw-r--r--packages/views/__init__.py5
-rw-r--r--packages/views/flag.py4
2 files changed, 6 insertions, 3 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py
index c1f0f492..b6e72d62 100644
--- a/packages/views/__init__.py
+++ b/packages/views/__init__.py
@@ -110,14 +110,15 @@ def update(request):
def arch_differences(request):
# TODO: we have some hardcoded magic here with respect to the arches.
- arch_a = Arch.objects.get(name='i686')
- arch_b = Arch.objects.get(name='x86_64')
+ arch_a = Arch.objects.get(name=request.GET.get('arch_a', 'i686'))
+ arch_b = Arch.objects.get(name=request.GET.get('arch_b', 'x86_64'))
differences = get_differences_info(arch_a, arch_b)
multilib_diffs = multilib_differences()
context = {
'arch_a': arch_a,
'arch_b': arch_b,
'differences': differences,
+ 'arches': Arch.objects.filter(agnostic=False),
'multilib_differences': multilib_diffs
}
return render(request, 'packages/differences.html', context)
diff --git a/packages/views/flag.py b/packages/views/flag.py
index 5680683a..c6936ac4 100644
--- a/packages/views/flag.py
+++ b/packages/views/flag.py
@@ -5,6 +5,7 @@ from django.conf import settings
from django.contrib.auth.decorators import permission_required
from django.core.mail import EmailMessage
from django.db import transaction
+from django.db.models import Q
from django.shortcuts import get_object_or_404, redirect, render
from django.template import loader, Context
from django.utils.timezone import now
@@ -58,7 +59,8 @@ def flag(request, name, repo, arch):
pkgs = Package.objects.normal().filter(
pkgbase=pkg.pkgbase, flag_date__isnull=True,
repo__testing=pkg.repo.testing,
- repo__staging=pkg.repo.staging).order_by(
+ repo__staging=pkg.repo.staging).filter(
+ Q(arch__name='mips64el') | Q(repo__name='Libre') | Q(repo__name='Pcr')).order_by(
'pkgname', 'repo__name', 'arch__name')
authenticated = request.user.is_authenticated()