summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_packages.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-05-13 19:41:29 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-15 12:48:52 +0200
commit955e4ceb12b155d3dc840f25197a11b663d09ecc (patch)
tree57f885c8469ede350f678dd6d72983278fa9a115 /bin/reproducible_html_packages.py
parent26b1d8a3cf6655232d03bf4c9688ea1b6009a717 (diff)
downloadjenkins.debian.net-955e4ceb12b155d3dc840f25197a11b663d09ecc.tar.xz
reproducible: fix all users of gen_packages_html() after the refactoring of it
notable changes: * gen_packages_html() in common.sh got renamed to the singular version gen_package_html() and now accept only one argument (a package name) + thus reproducible_blacklist.sh got fixed to pass one package at time + this greatly semplify the code, by removing *a lot* of crappy code * _html_all_packages.py really becomed a 2-liner, with part of its login being now either in _html_packages.py or removed.
Diffstat (limited to 'bin/reproducible_html_packages.py')
-rwxr-xr-xbin/reproducible_html_packages.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index ffc6aece..42fcf77e 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -232,12 +232,14 @@ def gen_packages_html(packages, no_clean=False):
purge_old_pages() # housekeep is always good
-def gen_all_rb_pkg_pages(suite='unstable', arch='amd64', no_clean=False):
- query = 'SELECT name FROM sources WHERE suite="%s" AND architecture="%s"' % (suite, arch)
+def gen_all_rb_pkg_pages(no_clean=False):
+ query = 'SELECT DISTINCT name FROM sources'
rows = query_db(query)
- pkgs = [str(i[0]) for i in rows]
- log.info('Processing all ' + str(len(pkgs)) + ' package pages for ' + suite + '/' + arch +'.')
- gen_packages_html(pkgs, suite=suite, arch=arch, no_clean=no_clean)
+ pkgs = [Package(str(i[0]), no_notes=True) for i in rows]
+ log.info('Processing all ' + str(len(pkgs)) + ' package from all suites/architectures')
+ gen_packages_html(pkgs, no_clean=True) # we clean at the end
+ purge_old_pages()
+
def purge_old_pages():
for suite in SUITES: