From 95fada0f4e9db5d46259a28b02c6d13830533ffe Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 7 Oct 2014 23:45:25 +0200 Subject: reproducible: improve output, provide links in dd-list --- bin/reproducible_stats.sh | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'bin/reproducible_stats.sh') diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index b35550f5..2162d422 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -209,25 +209,30 @@ for VIEW in $ALLVIEWS ; do SUMMARY=index_${VIEW}.html echo "Starting to write $SUMMARY page." write_summary_header $VIEW "Statistics for reproducible builds of ${SPOKENTARGET[$VIEW]}" - SHORTER_TARGET=$(echo ${SPOKENTARGET[$VIEW]} | cut -d "(" -f1) - write_summary "

$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly in total, from $SHORTER_TARGET these were: " + if [ "${VIEW:0:3}" = "all" ] ; then + FINISH=":" + else + SHORTER_SPOKENTARGET=$(echo ${SPOKENTARGET[$VIEW]} | cut -d "(" -f1) + FINISH=", from $SHORTER_SPOKENTARGET these were:" + fi + write_summary "

$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly in total$FINISH " link_packages ${BAD[$VIEW]} write_summary "

" write_summary "

A β sign after a package name indicates that no .buildinfo file was generated.

" write_summary - write_summary "

$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source in total, from $SHORTER_TARGET these were: " + write_summary "

$COUNT_UGLY packages ($PERCENT_UGLY%) failed to build from source in total$FINISH " link_packages ${UGLY[$VIEW]} write_summary "

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

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

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

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

" fi - if [ $COUNT_NOTFORUS -gt 0 ] ; then - write_summary "

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

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

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

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

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

" fi - write_summary "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly, from $SHORTER_TARGET these were: " + write_summary "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly$FINISH " link_packages ${GOOD[$VIEW]} write_summary "

" write_summary_footer @@ -238,7 +243,25 @@ VIEW=dd-list SUMMARY=index_${VIEW}.html echo "Starting to write $SUMMARY page." write_summary_header $VIEW "Statistics for reproducible builds of ${SPOKENTARGET[$VIEW]}" -write_summary "

$(echo ${BAD["all"]} | dd-list -i) 

" +TMPFILE=$(mktemp) +echo "${BAD["all"]}" | dd-list -i > $TMPFILE +write_summary "

"
+while IFS= read -r LINE ; do
+	if [ "${LINE:0:3}" = "   " ] ; then
+		PACKAGE=$(echo "${LINE:3}" | cut -d " " -f1)
+		UPLOADERS=$(echo "${LINE:3}" | cut -d " " -f2-)
+		if [ "$UPLOADERS" = "$PACKAGE" ] ; then
+			UPLOADERS=""
+		fi
+		write_summary "   $PACKAGE $UPLOADERS"
+	else
+		LINE="$(echo $LINE | sed 's#&#\&#g ; s#<#\<#g ; s#>#\>#g')"
+		write_summary "$LINE"
+	fi
+done < $TMPFILE
+write_summary "

" +rm $TMPFILE write_summary_footer - publish_summary +publish_summary +echo "Enjoy https://jenkins.debian.net/userContent/reproducible.html" -- cgit v1.2.3-70-g09d2