From 3feaaf83a09e33a1f427ad4aa8095b7497ff3222 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 15 Oct 2014 19:50:54 +0200 Subject: reproducible: use icons everywhere applicable --- bin/reproducible_stats.sh | 85 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 20 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index 02d17c94..a8146067 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -387,13 +387,18 @@ set_icon() { esac } +write_icon() { + # ICON and STATE_TARGET_NAME are set by set_icon() + write_page "\"${STATE_TARGET_NAME}" +} + init_pkg_page() { echo "" > ${PKG_FILE} echo "" >> ${PKG_FILE} echo "$1 - reproducible builds results" >> ${PKG_FILE} echo "
$1 $2" >> ${PKG_FILE} set_icon "$3" $5 - echo "\"${STATE_TARGET_NAME}" >> ${PKG_FILE} + write_icon echo "at $4: " >> ${PKG_FILE} } @@ -508,14 +513,16 @@ write_page_header() { if [ "$MY_STATE" = "FTBR_with_buildinfo" ] ; then WITH="YES" fi - set_icon $MY_STATE $WITH # sets ICON and STATE_TARGET_NAME - write_page "
  • \"${STATE_TARGET_NAME}
  • " + set_icon $MY_STATE $WITH + write_page "
  • " + write_icon + write_page "
  • " done for TARGET in issues notes $ALLVIEWS dd-list stats ; do if [ "$TARGET" = "$1" ] ; then continue - elif [ "$TARGET" = "issues" ] ; then - SPOKEN_TARGET="issues" + elif [ "$TARGET" = "issues" ] || [ "$TARGET" = "stats" ]; then + SPOKEN_TARGET=$TARGET else SPOKEN_TARGET=${SPOKENTARGET[$TARGET]} fi @@ -583,23 +590,43 @@ for VIEW in $ALLVIEWS ; do SHORTER_SPOKENTARGET=$(echo ${SPOKENTARGET[$VIEW]} | cut -d "(" -f1) FINISH=", from $SHORTER_SPOKENTARGET these were:" fi - write_page "

    $COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly in total$FINISH " + write_page "

    " + set_icon unreproducible with + write_icon + set_icon unreproducible + write_icon + write_page "$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly in total$FINISH " link_packages ${BAD[$VIEW]} write_page "

    " write_page - write_page "

    $COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source in total$FINISH " + write_page "

    " + set_icon FTBFS + write_icon + write_page "$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source in total$FINISH " link_packages ${UGLY[$VIEW]} write_page "

    " if [ "${VIEW:0:3}" = "all" ] && [ $COUNT_SOURCELESS -gt 0 ] ; then - write_page "

    For $COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages in total sources could not be downloaded: ${SOURCELESS[$VIEW]}

    " + write_page "

    For " + set_icon 404 + write_icon + write_page "$COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages in total sources could not be downloaded: ${SOURCELESS[$VIEW]}

    " fi if [ "${VIEW:0:3}" = "all" ] && [ $COUNT_NOTFORUS -gt 0 ] ; then - write_page "

    In total there were $COUNT_NOTFORUS ($PERCENT_NOTFORUS%) packages which are neither Architecture: 'any', 'all', 'amd64', 'linux-any', 'linux-amd64' nor 'any-amd64': ${NOTFORUS[$VIEW]}

    " + write_page "

    In total there were " + set_icon not_for_us + write_icon + write_page "$COUNT_NOTFORUS ($PERCENT_NOTFORUS%) packages which are neither Architecture: 'any', 'all', 'amd64', 'linux-any', 'linux-amd64' nor 'any-amd64': ${NOTFORUS[$VIEW]}

    " fi if [ "${VIEW:0:3}" = "all" ] && [ $COUNT_BLACKLISTED -gt 0 ] ; then - write_page "

    $COUNT_BLACKLISTED packages are blacklisted and will never be tested here: $BLACKLISTED

    " + write_page "

    " + set_icon blacklisted + write_icon + write_page "$COUNT_BLACKLISTED packages are blacklisted and will never be tested here: $BLACKLISTED

    " fi - write_page "

    $COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly$FINISH " + write_page "

    " + set_icon reproducible + write_icon + write_page "$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly$FINISH " link_packages ${GOOD[$VIEW]} write_page "

    " write_page_meta_sign @@ -685,10 +712,10 @@ for STATE in $ALLSTATES ; do ;; esac count_packages ${PACKAGES} - write_page "

    $COUNT ($PERCENT%)" - set_icon $STATE $WITH # sets ICON and STATE_TARGET_NAME - write_page "\"${STATE_TARGET_NAME}" - write_page " ${SPOKENTARGET[$STATE]}:" + write_page "

    " + set_icon $STATE $WITH + write_icon + write_page "$COUNT ($PERCENT%) ${SPOKENTARGET[$STATE]}:" link_packages ${PACKAGES} write_page "

    " write_page @@ -781,14 +808,32 @@ VIEW=stats PAGE=index_${VIEW}.html echo "Starting to write $PAGE page." write_page_header $VIEW "Overview of ${SPOKENTARGET[$VIEW]}" -write_page "

    $COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly.

    " -write_page "

    $COUNT_BAD packages ($PERCENT_BAD%) failed to built reproducibly.

    " -write_page "

    $COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source.

    " +write_page "

    " +set_icon reproducible +write_icon +write_page "$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly." +set_icon unreproducible with +write_icon +set_icon unreproducible +write_icon +write_page "$COUNT_BAD packages ($PERCENT_BAD%) failed to built reproducibly." +set_icon FTBFS +write_icon +write_page "$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source.

    " +write_page "

    " if [ $COUNT_SOURCELESS -gt 0 ] ; then - write_page "

    For $COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages sources could not be downloaded," + write_page "For " + set_icon 404 + write_icon + write_page "$COUNT_SOURCELESS ($PERCENT_SOURCELESS%) packages sources could not be downloaded," fi +set_icon not_for_us +write_icon write_page "$COUNT_NOTFORUS ($PERCENT_NOTFORUS%) packages which are neither Architecture: 'any', 'all', 'amd64', 'linux-any', 'linux-amd64' nor 'any-amd64' will never be build here" -write_page "and those $COUNT_BLACKLISTED blacklisted packages neither.

    " +write_page "and those " +set_icon blacklisted +write_icon +write_page "$COUNT_BLACKLISTED blacklisted packages neither.

    " write_page "

    " # FIXME: we don't do stats_builds_age.png yet :/ for i in 0 1 ; do -- cgit v1.2.3-70-g09d2