From 694db971af783dddfd0b644135aa37f162057aa5 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 2 Mar 2015 20:35:28 +0100 Subject: reproducible: more suite related navigation fixes --- bin/reproducible_common.py | 2 +- bin/reproducible_common.sh | 43 ++++++++++++++++++++----------------- bin/reproducible_html_dd_list.sh | 5 +++-- bin/reproducible_html_graphs.sh | 14 ++++++------ bin/reproducible_html_indexes.py | 2 +- bin/reproducible_html_repo_stats.sh | 3 ++- 6 files changed, 37 insertions(+), 32 deletions(-) diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 8abdb34e..c05f3d63 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -160,7 +160,7 @@ html_head_page = Template((tab*2).join("""
  • packages tested in the last 24h
  • packages tested in the last 48h
  • all tested packages (sorted alphabetically)
  • -
  • maintainers of unreproducible packages
  • +
  • maintainers of unreproducible packages
  • apt repository stats
  • package sets stats
  • stats
  • diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index 80a67fa2..65b58af1 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -77,23 +77,24 @@ init_html() { MAINVIEW="stats" ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted" ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list repo_stats pkg_sets stats" - SPOKENTARGET["reproducible"]="packages which built reproducibly" - SPOKENTARGET["FTBR"]="packages which failed to build reproducibly" - SPOKENTARGET["FTBFS"]="packages which failed to build from source" - SPOKENTARGET["404"]="packages where the sources failed to download" - SPOKENTARGET["not_for_us"]="packages which should not be build on 'amd64'" - SPOKENTARGET["blacklisted"]="packages which have been blacklisted" + GLOBALVIEWS="issues notes no_notes repo_stats pkg_sets stats" + SPOKENTARGET["reproducible"]="packages in $SUITE which built reproducibly" + SPOKENTARGET["FTBR"]="packages in $SUITE which failed to build reproducibly" + SPOKENTARGET["FTBFS"]="packages in $SUITE which failed to build from source" + SPOKENTARGET["404"]="packages in $SUITE where the sources failed to download" + SPOKENTARGET["not_for_us"]="packages in $SUITE which should not be build on 'amd64'" + SPOKENTARGET["blacklisted"]="packages in $SUITE which have been blacklisted" SPOKENTARGET["issues"]="known issues related to reproducible builds" SPOKENTARGET["notes"]="packages with notes" SPOKENTARGET["no_notes"]="packages without notes" - SPOKENTARGET["scheduled"]="packages currently scheduled for testing for build reproducibility" - SPOKENTARGET["last_24h"]="packages tested in the last 24h" - SPOKENTARGET["last_48h"]="packages tested in the last 48h" - SPOKENTARGET["all_abc"]="all tested packages (sorted alphabetically)" - SPOKENTARGET["dd-list"]="maintainers of unreproducible packages" + SPOKENTARGET["scheduled"]="packages in $SUITE currently scheduled for testing for build reproducibility" + SPOKENTARGET["last_24h"]="packages in $SUITE tested in the last 24h" + SPOKENTARGET["last_48h"]="packages in $SUITE tested in the last 48h" + SPOKENTARGET["all_abc"]="all tested packages in $SUITE (sorted alphabetically)" + SPOKENTARGET["dd-list"]="maintainers of unreproducible packages in $SUITE" SPOKENTARGET["repo_stats"]="statistics about the reproducible builds apt repository" - SPOKENTARGET["pkg_sets"]="statistics about reproducible builds of specific package sets" - SPOKENTARGET["stats"]="various statistics about reproducible builds" + SPOKENTARGET["pkg_sets"]="statistics about reproducible builds of specific package sets in $SUITE" + SPOKENTARGET["stats"]="various statistics about reproducible builds for $SUITE" # query some data we need everywhere AMOUNT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT count(*) FROM sources WHERE suite=\"${SUITE}\"") COUNT_TOTAL=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(*) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite=\"${SUITE}\"") @@ -133,7 +134,7 @@ set_icon() { write_icon() { # ICON and STATE_TARGET_NAME are set by set_icon() - write_page "\"${STATE_TARGET_NAME}" + write_page "\"${STATE_TARGET_NAME}" } write_page_header() { @@ -170,7 +171,13 @@ write_page_header() { else SPOKEN_TARGET=${SPOKENTARGET[$TARGET]} fi - write_page "
  • ${SPOKEN_TARGET}
  • " + BASEURL="/$SUITE" + for i in $GLOBALVIEWS ; do + if [ "$TARGET" = "$i" ] ; then + BASEURL="" + fi + done + write_page "
  • ${SPOKEN_TARGET}
  • " done write_page "" write_page "" @@ -208,12 +215,8 @@ set_package_class() { } set_linktarget() { - local SUITE="$1" - local ARCH="$2" - shift - shift for PKG in $@ ; do - if [ -f $RB_PATH/$SUITE/$PKG.html ] ; then + if [ -f $RB_PATH/$SUITE/$ARCH/$PKG.html ] ; then set_package_class LINKTARGET[$PKG]="$PKG" else diff --git a/bin/reproducible_html_dd_list.sh b/bin/reproducible_html_dd_list.sh index 9acfd747..bc2aa27e 100755 --- a/bin/reproducible_html_dd_list.sh +++ b/bin/reproducible_html_dd_list.sh @@ -11,7 +11,8 @@ common_init "$@" # common code defining db access . /srv/jenkins/bin/reproducible_common.sh -set +x +SUITE="sid" +ARCH="amd64" init_html VIEW=dd-list @@ -33,7 +34,7 @@ for $SUITE in $SUITES ; do if [ "$UPLOADERS" = "$PACKAGE" ] ; then UPLOADERS="" fi - write_page " $PACKAGE $UPLOADERS" + write_page " $PACKAGE $UPLOADERS" else LINE="$(echo $LINE | sed 's#&#\&#g ; s#<#\<#g ; s#>#\>#g')" write_page "$LINE" diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index 0522192b..aa2087fb 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -11,9 +11,6 @@ common_init "$@" # common code defining db access . /srv/jenkins/bin/reproducible_common.sh -init_html -gather_stats - if [ -n "$1" ] ; then SUITE="$1" else @@ -21,6 +18,9 @@ else fi ARCH="amd64" # we only care about amd64 status here (for now) +init_html +gather_stats + # # create stats # @@ -331,20 +331,20 @@ for i in $(seq 1 ${#META_PKGSET[@]}) ; do set_icon reproducible write_icon write_page "$COUNT_META_GOOD packages ($PERCENT_META_GOOD%) successfully built reproducibly:" - set_linktarget $SUITE $ARCH $META_GOOD + set_linktarget $META_GOOD link_packages $META_GOOD write_page "
    " set_icon unreproducible write_icon write_page "$COUNT_META_BAD ($PERCENT_META_BAD%) packages failed to built reproducibly:" - set_linktarget $SUITE $ARCH $META_BAD + set_linktarget $META_BAD link_packages $META_BAD write_page "
    " 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 $SUITE $ARCH $META_UGLY + set_linktarget $META_UGLY link_packages $META_UGLY write_page "
    " fi @@ -356,7 +356,7 @@ for i in $(seq 1 ${#META_PKGSET[@]}) ; do 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 $SUITE $ARCH $META_REST + set_linktarget $META_REST link_packages $META_REST write_page "
    " fi diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py index b3687cee..6ef416aa 100755 --- a/bin/reproducible_html_indexes.py +++ b/bin/reproducible_html_indexes.py @@ -65,7 +65,7 @@ queries = { pages = { 'reproducible': { - 'title': 'Overview of packages which built reproducibly', + 'title': 'Overview of packages in which built reproducibly', 'body': [ { 'icon_status': 'reproducible', diff --git a/bin/reproducible_html_repo_stats.sh b/bin/reproducible_html_repo_stats.sh index eebaed86..30cd1654 100755 --- a/bin/reproducible_html_repo_stats.sh +++ b/bin/reproducible_html_repo_stats.sh @@ -10,7 +10,8 @@ common_init "$@" # common code defining db access . /srv/jenkins/bin/reproducible_common.sh -set +x +SUITE="sid" +ARCH="amd64" init_html VIEW=repo_stats -- cgit v1.2.3-70-g09d2