From 5c7d507eea116d9c86216b35aadb9d181f471ccd Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 2 Apr 2010 17:39:41 -0500 Subject: Improve flag out-of-date logic Attempt to mark all packages built from the same PKGBUILD out of date at the same time by using pkgbase instead of pkgname. Ensure testing and non-testing repos are segregated as well. Signed-off-by: Dan McGee --- packages/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/views.py b/packages/views.py index efb64c51..fc366988 100644 --- a/packages/views.py +++ b/packages/views.py @@ -273,9 +273,9 @@ def flag(request, pkgid): if request.POST: form = FlagForm(request.POST) if form.is_valid() and form.cleaned_data['website'] == '': - # flag all architectures + # find all packages from (hopefully) the same PKGBUILD pkgs = Package.objects.filter( - pkgname=pkg.pkgname, repo=pkg.repo) + pkgbase=pkg.pkgbase, repo__testing=pkg.repo.testing) pkgs.update(needupdate=True) maints = pkg.maintainers -- cgit v1.2.3-55-g3dc8