From 41b8820a0628e589c01c50050bcae57550593f65 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 14 May 2015 02:17:26 +0200 Subject: reproducible: split pkg set pages into many --- bin/reproducible_html_graphs.sh | 50 +++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 17 deletions(-) (limited to 'bin/reproducible_html_graphs.sh') diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index a4d8c102..5421f53a 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -175,8 +175,9 @@ gather_suite_stats() { # gather meta pkg stats # gather_meta_stats() { - if [ -f /srv/reproducible-results/meta_pkgsets-$SUITE/${META_PKGSET[$1]}.pkgset ] ; then - META_LIST=$(cat /srv/reproducible-results/meta_pkgsets-$SUITE/${META_PKGSET[$1]}.pkgset) + PKGSET_PATH=/srv/reproducible-results/meta_pkgsets-$SUITE/${META_PKGSET[$1]}.pkgset + if [ -f $PKGSET_PATH ] ; then + META_LIST=$(cat $PKGSET_PATH) if [ ! -z "$META_LIST" ] ; then META_WHERE="" for PKG in $META_LIST ; do @@ -412,9 +413,12 @@ create_suite_stats_page() { } # -# create pkg sets page +# create pkg sets pages # -create_pkg_sets_page() { +create_pkg_sets_pages() { + # + # create index page + # VIEW=pkg_sets PAGE=index_${VIEW}.html echo "$(date) - starting to write $PAGE page." @@ -422,17 +426,28 @@ create_pkg_sets_page() { write_page "" + write_page_footer + publish_page $SUITE/$ARCH + # + # create individual pages for all the sets + # for i in $(seq 1 ${#META_PKGSET[@]}) ; do - THUMB="${TABLE[6]}_${META_PKGSET[$i]}-thumbnail.png" - LABEL="Reproducibility status for packages in $SUITE/$ARCH from '${META_PKGSET[$i]}'" - write_page "\"$LABEL\"" - done - for i in $(seq 1 ${#META_PKGSET[@]}) ; do - write_page "
" + PAGE="pkg_set_${META_PKGSET[$i]}.html" + echo "$(date) - starting to write $PAGE page." + write_page_header $VIEW "Overview about reproducible builds for the ${META_PKGSET[$i]} package set in $SUITE/$ARCH" + for j in $(seq 1 ${#META_PKGSET[@]}) ; do + THUMB=${TABLE[6]}_${META_PKGSET[$j]}-thumbnail.png + LABEL="package set '${META_PKGSET[$j]}' in $SUITE/$ARCH" + write_page "\"$LABEL\"" + done META_RESULT=true gather_meta_stats $i # FIXME: this ignores unknown packages... if $META_RESULT ; then @@ -445,7 +460,8 @@ create_pkg_sets_page() { create_png_from_table 6 $SUITE/$ARCH/$PNG ${META_PKGSET[$i]} convert $BASE/$SUITE/$ARCH/$PNG -adaptive-resize 160x80 $BASE/$SUITE/$ARCH/$THUMB fi - write_page "

\"${MAINLABEL[6]}\"" + LABEL="package set '${META_PKGSET[$j]}' in $SUITE/$ARCH" + write_page "

\"$LABEL\"" write_page "
The package set '${META_PKGSET[$i]}' in $SUITE/$ARCH consists of:
" set_icon unreproducible write_icon @@ -476,11 +492,11 @@ create_pkg_sets_page() { link_packages $META_GOOD write_page "
" write_page "

" - write_page_meta_sign + write_page_meta_sign fi + write_page_footer + publish_page $SUITE/$ARCH done - write_page_footer - publish_page $SUITE/$ARCH } # @@ -506,7 +522,7 @@ create_main_stats_page() { for i in $(seq 1 ${#META_PKGSET[@]}) ; do THUMB=${TABLE[6]}_${META_PKGSET[$i]}-thumbnail.png LABEL="Reproducibility status for packages in $SUITE/$ARCH from '${META_PKGSET[$i]}'" - write_page "\"$LABEL\"" + write_page "\"$LABEL\"" done done write_page "

" @@ -570,6 +586,6 @@ for SUITE in $SUITES ; do continue fi update_meta_pkg_stats - create_pkg_sets_page + create_pkg_sets_pages done -- cgit v1.2.3-54-g00ecf