[Qa-jenkins-scm] [jenkins.debian.net] 07/08: reproducible: _html_breakages: add a check to detect stale history pages. Consider that currently nothing delete them automatically
Holger Levsen
holger at moszumanska.debian.org
Fri Oct 9 16:03:59 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit b4695aefe11308e3b02223e19b8865115660f5fe
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Fri Oct 9 15:38:10 2015 +0000
reproducible: _html_breakages: add a check to detect stale history pages. Consider that currently nothing delete them automatically
---
TODO | 1 +
bin/reproducible_html_breakages.py | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/TODO b/TODO
index 8fa2632..c183345 100644
--- a/TODO
+++ b/TODO
@@ -157,6 +157,7 @@ properties:
** link howto on each coreboot/openwrt/netbsd/freebsd page
** pkg sets are still amd64 only atm… (and there is 404 link to the armhf page)
** bin/_html_indexes.py: bugs = get_bugs() # this variable should not be global, else merely importing _html_indexes always queries UDD
+** add a mean to automatically delete the history pages
* lesser prio
** dashboard:
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py
index 67698f1..029d94a 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())
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list