[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible Debian: also delete alien buildinfo files older than a day
Holger Levsen
holger at layer-acht.org
Tue Jan 24 01:06:54 UTC 2017
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 64bd4113d0f5b6c8dd69e117cc94f85d535791b2
Author: Holger Levsen <holger at layer-acht.org>
Date: Tue Jan 24 02:06:43 2017 +0100
reproducible Debian: also delete alien buildinfo files older than a day
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_html_breakages.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py
index 473505f..e2a42f1 100755
--- a/bin/reproducible_html_breakages.py
+++ b/bin/reproducible_html_breakages.py
@@ -209,8 +209,15 @@ def alien_buildinfo():
except IndexError: # that package is not known (or not yet tested)
rversion = '' # continue towards the "bad file" path
if strip_epoch(rversion) != version:
- bad_files.append('/'.join([root, file]))
- log.warning('/'.join([root, file]) + ' should not be there')
+ try:
+ if os.path.getmtime('/'.join([root, file]))<time.time()-86400:
+ os.remove('/'.join([root, file]))
+ log.warning('/'.join([root, file]) + ' should not be there and and was older than a day so it was removed.')
+ else:
+ bad_files.append('/'.join([root, file]))
+ log.info('/'.join([root, file]) + ' should not be there, but is also less than 24h old and will probably soon be gone.')
+ except FileNotFoundError:
+ pass # that bad file is already gone.
return bad_files
@@ -336,13 +343,13 @@ def gen_html():
html = ''
# files that should not be there (e.g. removed packages without cleanup)
html += '<h2>Breakage caused by jenkins.debian.net</h2>'
- html += _gen_files_html('log files that should not be there:',
+ html += _gen_files_html('log files that should not be there (and which will be deleted once they are older than 24h):',
entries=alien_log())
html += _gen_files_html('diffoscope files that should not be there:',
entries=alien_dbd())
html += _gen_files_html('rb-pkg pages that should not be there:',
entries=alien_rbpkg())
- html += _gen_files_html('buildinfo files that should not be there:',
+ html += _gen_files_html('buildinfo files that should not be there (and which will be deleted once they are older than 24h):',
entries=alien_buildinfo())
html += _gen_files_html('history pages that should not be there and thus have been removed:',
entries=alien_history())
--
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