From b4695aefe11308e3b02223e19b8865115660f5fe Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Fri, 9 Oct 2015 15:38:10 +0000 Subject: reproducible: _html_breakages: add a check to detect stale history pages. Consider that currently nothing delete them automatically --- bin/reproducible_html_breakages.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin/reproducible_html_breakages.py') diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py index 67698f16..029d94a4 100755 --- a/bin/reproducible_html_breakages.py +++ b/bin/reproducible_html_breakages.py @@ -244,6 +244,17 @@ def alien_rbpkg(): return bad_files +def alien_history(): + log.info('running alien_history check...') + result = query_db('SELECT DISTINCT name FROM sources') + actual_packages = [x[0] for x in result] + bad_files = [] + for f in sorted(os.listdir(HISTORY_PATH)): + if f.rsplit('.', 1)[0] not in actual_packages: + log.warning('%s should not be there', os.path.join(HISTORY_PATH, f)) + return bad_files + + def _gen_section(header, pkgs, entries=None): if not pkgs and not entries: return '' @@ -275,6 +286,8 @@ def gen_html(): entries=alien_rbpkg()) html += _gen_section('buildinfo files that should not be there:', None, entries=alien_buildinfo()) + html += _gen_section('history tables that should not be there:', None, + entries=alien_history()) # diffoscope report where it shouldn't be html += _gen_section('are not marked as unreproducible, but they ' + 'have a diffoscope file:', not_unrep_with_dbd_file()) -- cgit v1.2.3-54-g00ecf