summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-21 23:20:07 +0200
committerMattia Rizzolo <mattia@mapreri.org>2015-04-21 23:35:31 +0200
commit52b794f0f6c57d93e2a959b8b4abc3d4c7563dc4 (patch)
tree023f125a658b4280eb38111fc5004e8931dc4610 /bin
parentccbdbcb1b50f96c3a623093402c368cfa8110fc7 (diff)
downloadjenkins.debian.net-52b794f0f6c57d93e2a959b8b4abc3d4c7563dc4.tar.xz
reproducible: common.sh: drop that set_linktarget nonsense, and teach link_packages to query the homonym function of its python brother
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.sh31
-rwxr-xr-xbin/reproducible_html_graphs.sh4
2 files changed, 15 insertions, 20 deletions
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 "<br />"
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 "<br />"
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 "<br />"
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 "<br />"
fi