summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-01-24 02:06:43 +0100
committerHolger Levsen <holger@layer-acht.org>2017-01-24 02:06:43 +0100
commit64bd4113d0f5b6c8dd69e117cc94f85d535791b2 (patch)
treee9050e94ff9b12d700fc42e8c5ecc0c5d37e8e62 /bin
parent390d06dcac992312f69b3e8db2266a42d8b9aa04 (diff)
downloadjenkins.debian.net-64bd4113d0f5b6c8dd69e117cc94f85d535791b2.tar.xz
reproducible Debian: also delete alien buildinfo files older than a day
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_breakages.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py
index 473505f9..e2a42f11 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())