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_common.sh | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'bin/reproducible_common.sh') diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 64854c4f..1ce6f630 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -346,27 +346,12 @@ link_packages() { if "$DEBUG" ; then set -x ; fi } -gen_packages_html() { - local suite="$1" - shift - CWD=$(pwd) +gen_package_html() { cd /srv/jenkins/bin - local i - for (( i=1; i<$#+1; i=i+100 )) ; do - local string='[' - local delimiter='' - local j - for (( j=0; j<100; j++)) ; do - local item=$(( $j+$i )) - if (( $item < $#+1 )) ; then - string+="${delimiter}\"${!item}\"" - delimiter=',' - fi - done - string+=']' - python3 -c "from reproducible_html_packages import gen_packages_html; gen_packages_html(${string}, suite=\"${suite}\", no_clean=True)" || echo "Warning: cannot update html pages for ${string} in ${suite}" - done - cd "$CWD" + python3 -c "import reproducible_html_packages as rep +pkg = rep.Package('$1', no_notes=True) +rep.gen_packages_html([pkg], no_clean=True)" || echo "Warning: cannot update html pages for $1" + cd - > /dev/null } calculate_build_duration() { -- cgit v1.2.3-54-g00ecf