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 <dan@archlinux.org>
This commit is contained in:
Dan McGee 2010-04-02 17:39:41 -05:00
parent a52e3901c9
commit 5c7d507eea

View File

@ -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