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 +++++++++++++++---------------- bin/reproducible_html_graphs.sh | 4 ---- 2 files changed, 15 insertions(+), 20 deletions(-) (limited to 'bin') 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() { diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index f29e270a..09ac89bb 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -436,20 +436,17 @@ create_pkg_sets_page() { set_icon reproducible write_icon write_page "$COUNT_META_GOOD packages ($PERCENT_META_GOOD%) successfully built reproducibly:" - set_linktarget $META_GOOD link_packages $META_GOOD write_page "
" set_icon unreproducible write_icon write_page "$COUNT_META_BAD ($PERCENT_META_BAD%) packages failed to built reproducibly:" - set_linktarget $META_BAD link_packages $META_BAD write_page "
" if [ $COUNT_META_UGLY -gt 0 ] ; then set_icon FTBFS write_icon write_page "$COUNT_META_UGLY ($PERCENT_META_UGLY%) packages failed to build from source:" - set_linktarget $META_UGLY link_packages $META_UGLY write_page "
" fi @@ -461,7 +458,6 @@ create_pkg_sets_page() { set_icon 404 write_icon write_page "$COUNT_META_REST ($PERCENT_META_REST%) packages are either blacklisted, not for us or cannot be downloaded:" - set_linktarget $META_REST link_packages $META_REST write_page "
" fi -- cgit v1.2.3-70-g09d2