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 --- TODO | 1 - bin/reproducible_common.sh | 1 + bin/reproducible_html_graphs.sh | 50 +++++++++++++++++++++++++++-------------- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/TODO b/TODO index d6e247c7..19d172ab 100644 --- a/TODO +++ b/TODO @@ -212,7 +212,6 @@ grep '(=.*).,.$' rygel_0.24.2-1.debbindiff.html | uniq -c | sort | grep -c '^\s* ** add note to all the notes+issues pages explaining that too * pkg sets related: -** split the page into 26 different one, keep the existing and its anchors so that existing links continue to work (but then just provides another pointer to the new sub page for that set) ** for all pkg sets: only display FTBR+FTBFS and reproducible packages with notes by default, provide a way to show them all... ** replace bin/reproducible_installed_on_debian.org with a proper data provider from DSA, eg https://anonscm.debian.org/cgit/mirror/debian.org.git/plain/debian/control diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 28bec0cc..49a70ca8 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -207,6 +207,7 @@ write_page_header() { fi SPOKEN_TARGET=${SPOKENTARGET[$TARGET]} BASEURL="/$SUITE/$ARCH" + local i for i in $GLOBALVIEWS ; do if [ "$TARGET" = "$i" ] ; then BASEURL="" 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