From 955e4ceb12b155d3dc840f25197a11b663d09ecc Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Wed, 13 May 2015 19:41:29 +0200 Subject: 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. --- bin/reproducible_html_packages.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bin/reproducible_html_packages.py') 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: -- cgit v1.2.3-54-g00ecf