[Git][qa/jenkins.debian.net][master] reproducible Debian scheduler: refactoring

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Jul 6 00:21:21 BST 2023



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
4360d8eb by Holger Levsen at 2023-07-06T01:21:11+02:00
reproducible Debian scheduler: refactoring

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_scheduler.py


Changes:

=====================================
bin/reproducible_scheduler.py
=====================================
@@ -292,17 +292,16 @@ class Limit:
             return self.get_limit('*')
 
 
-def update_sources(suite):
+def update_sources(suite, arch):
     # download the sources file for this suite
     mirror = 'http://deb.debian.org/debian'
     remotefile = mirror + '/dists/' + suite + '/main/source/Sources.xz'
     log.info('Downloading sources file for %s: %s', suite, remotefile)
     sources = lzma.decompress(urlopen(remotefile).read()).decode('utf8')
     log.debug('\tdownloaded')
-    for arch in ARCHS:
-        log.info('Updating sources db for %s/%s...', suite, arch)
-        update_sources_db(suite, arch, sources)
-        log.info('DB update done for %s/%s done at %s.', suite, arch, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
+    log.info('Updating sources db for %s/%s...', suite, arch)
+    update_sources_db(suite, arch, sources)
+    log.info('DB update done for %s/%s done at %s.', suite, arch, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
 
 
 def update_sources_db(suite, arch, sources):
@@ -796,8 +795,8 @@ if __name__ == '__main__':
     arch = sys.argv[1]
     log.info('Updating sources tables for all suites.')
     for suite in SUITES:
-        update_sources(suite)
-        log.info('Sources for suite %s done at %s.', suite, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
+        update_sources(suite, arch)
+        log.info('Sources for suite %s/%s updated at %s.', suite, arch, datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
     purge_old_pages()
     query = "SELECT count(*) " + \
             "FROM schedule AS p JOIN sources AS s ON s.id=p.package_id " + \



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/4360d8eb51528750a5cf043caf21992770fb9ae1

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/4360d8eb51528750a5cf043caf21992770fb9ae1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20230705/ee969abe/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list