From 52b794f0f6c57d93e2a959b8b4abc3d4c7563dc4 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 21 Apr 2015 23:20:07 +0200 Subject: reproducible: common.sh: drop that set_linktarget nonsense, and teach link_packages to query the homonym function of its python brother --- bin/reproducible_common.sh | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'bin/reproducible_common.sh') diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index e26c7a81..c1769e76 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -49,7 +49,6 @@ USERTAGS="toolchain infrastructure timestamps fileordering buildpath username ho # we only need them for html creation but we cannot declare them in a function declare -A SPOKENTARGET -declare -A LINKTARGET NOTES_PATH=/var/lib/jenkins/userContent/notes ISSUES_PATH=/var/lib/jenkins/userContent/issues @@ -261,23 +260,23 @@ set_package_class() { fi } -set_linktarget() { - cd "$BASE" - for PKG in $@ ; do - if [ -f $RB_PATH/$SUITE/$ARCH/$PKG.html ] ; then - LINKTARGET[$PKG]=$(python3 -c "from reproducible_common import link_package ; \ - print(link_package('$PKG', '$SUITE', '$ARCH'))") - else - LINKTARGET[$PKG]="$PKG" - fi - done - cd - > /dev/null -} - link_packages() { - for PKG in $@ ; do - write_page " ${LINKTARGET[$PKG]}" + cd /srv/jenkins/bin + for (( i=1; i<$#+1; i=i+400 )) ; do + local string='[' + local delimiter='' + for (( j=0; j<400; j++)) ; do + local item=$(( $j+$i )) + if (( $item < $#+1 )) ; then + local string+="${delimiter}\"${!item}\"" + local delimiter=',' + fi + done + local string+=']' + write_page " $(python3 -c "from reproducible_common import link_packages; \ + print(link_packages(${string}, '$SUITE', '$ARCH'))" 2> /dev/null)" done + cd - > /dev/null } gen_packages_html() { -- cgit v1.2.3-54-g00ecf