diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-02-28 14:36:34 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-28 14:36:34 +0100 |
commit | 6372f5f830827d2ee608e87e85f7d61abe835b93 (patch) | |
tree | 0d33faef53123d3e14ff458fda6a696115a7436c | |
parent | fc84314001a8de28e2500cfafd9aad728221f9a8 (diff) | |
download | jenkins.debian.net-6372f5f830827d2ee608e87e85f7d61abe835b93.tar.xz |
reproducible: run 'apt-get update' for each suites schroot, not on the host
-rwxr-xr-x | bin/reproducible_scheduler.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py index 387564a9..38e0c376 100755 --- a/bin/reproducible_scheduler.py +++ b/bin/reproducible_scheduler.py @@ -23,15 +23,17 @@ from reproducible_common import * from reproducible_html_indexes import build_page -def call_apt_update(): +def call_apt_update(suite): # try three times, before failing the job for i in [1, 2, 3]: - if not call(['sudo', 'apt-get', 'update']): + if not call(['schroot', '--directory', '/root', '-u', 'root', \ + '-c', 'source:jenkins-'+suite, '--', \ + 'apt-get', 'update']): return else: - log.warning('apt failed. retring another ' + 3-i + ' times') + log.warning('`apt-get update` failed. Retrying another ' + 3-i + ' times.') sleep(randint(1, 70) + 30) - print_critical_message('`apt-get update` failed for three times in a row') + print_critical_message('`apt-get update` for suite '+suite+' failed three times in a row, giving up.') sys.exit(1) @@ -259,7 +261,7 @@ def scheduler(suite): if __name__ == '__main__': - call_apt_update() for suite in SUITES: + call_apt_update(suite) update_sources_tables(suite) scheduler(suite) |