diff options
author | Dan McGee <dan@archlinux.org> | 2012-02-12 22:47:25 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-12 22:47:25 -0600 |
commit | fa6f85f127f5f100f98c0ce130cea2277cd02a0e (patch) | |
tree | c19486c2d1e94ff91e470c93aafd2450cdc533ef /devel | |
parent | 30acd5c81689545ba02dfa392b118f262f3511b8 (diff) |
Reduce false positives returned by uncompressed manpages report
Explicitly exclude '.html' files from the report. This fixes the issue
noted in FS#28372.
We also add `is_directory=False` to both the manpage and info page
queries; this could help the database come up with a better plan.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r-- | devel/views.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/devel/views.py b/devel/views.py index 35918d66..5f1aed54 100644 --- a/devel/views.py +++ b/devel/views.py @@ -209,8 +209,10 @@ def report(request, report_name, username=None): elif report_name == 'uncompressed-man': title = 'Packages with uncompressed manpages' # checking for all '.0'...'.9' + '.n' extensions - bad_files = PackageFile.objects.filter(directory__contains='/man/', - filename__regex=r'\.[0-9n]').exclude(filename__endswith='.gz') + bad_files = PackageFile.objects.filter(is_directory=False, + directory__contains='/man/', + filename__regex=r'\.[0-9n]').exclude( + filename__endswith='.gz').exclude(filename__endswith='.html') if username: pkg_ids = set(packages.values_list('id', flat=True)) bad_files = bad_files.filter(pkg__in=pkg_ids) @@ -220,8 +222,8 @@ def report(request, report_name, username=None): title = 'Packages with uncompressed infopages' # we don't worry about looking for '*.info-1', etc., given that an # uncompressed root page probably exists in the package anyway - bad_files = PackageFile.objects.filter(directory__endswith='/info/', - filename__endswith='.info') + bad_files = PackageFile.objects.filter(is_directory=False, + directory__endswith='/info/', filename__endswith='.info') if username: pkg_ids = set(packages.values_list('id', flat=True)) bad_files = bad_files.filter(pkg__in=pkg_ids) |