summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_common.sh
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_common.sh
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_common.sh')
-rwxr-xr-xbin/reproducible_common.sh25
1 files changed, 5 insertions, 20 deletions
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() {