From 01c5e47451204920bf06355c4475fe1d69775595 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 25 Feb 2015 11:27:18 +0100 Subject: reproducible: explain why we keep old versions around, highlight differences --- bin/reproducible_html_repo_stats.sh | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/bin/reproducible_html_repo_stats.sh b/bin/reproducible_html_repo_stats.sh index df4c755d..de867692 100755 --- a/bin/reproducible_html_repo_stats.sh +++ b/bin/reproducible_html_repo_stats.sh @@ -20,11 +20,11 @@ write_page_header $VIEW "Overview of ${SPOKENTARGET[$VIEW]}" TMPFILE=$(mktemp) curl http://reproducible.alioth.debian.org/debian/Packages > $TMPFILE -write_page "

These source packages are different from sid in our toolchain. They are available in an apt repository on alioth which is accessable with these sources.lists entries:

"
+write_page "

These source packages are different from sid in our apt repository on alioth. They are available for testing using these sources.lists entries:

"
 write_page "deb http://reproducible.alioth.debian.org/debian/ ./"
 write_page "deb-src http://reproducible.alioth.debian.org/debian/ ./"
 write_page "

" -write_page "

" +write_page "

source packageversion in our repoversion in sidcruft in our repo (if any)
" SOURCES=$(grep-dctrl -n -s source -FArchitecture amd64 -o -FArchitecture all $TMPFILE | sort -u) for PKG in $SOURCES ; do write_page "" @@ -32,6 +32,9 @@ for PKG in $SOURCES ; do CRUFT="" WARN=false BET="" + # + # gather versions of a package + # for VERSION in ${VERSIONS} ; do if [ "$BET" = "" ] ; then BET=${VERSION} @@ -40,15 +43,38 @@ for PKG in $SOURCES ; do BET=${VERSION} fi done - write_page "" SID=$(rmadison -s sid $PKG | cut -d "|" -f2|xargs echo|sed 's# #
#g') - write_page "" for VERSION in ${VERSIONS} ; do if [ "${VERSION}" != "$BET" ] ; then WARN=true CRUFT="$CRUFT ${VERSION}" fi done + # + # colorize output + # + CSID="" + for i in $SID ; do + if dpkg --compare-versions "$i" gt "$BET" ; then + CSID="$CSID $i" + BET="" + if [ ! -z "$BET" ] ; then + CRUFT="$BET $CRUFT" + fi + else + CSID="$CSID $I" + fi + done + if [ ! -z "$BET" ] ; then + BET="$BET" + else + BET=" " + fi + # + # write output + # + write_page "" + write_page "" if $WARN ; then echo "Warning: more than one version of $PKG available in our repo, please clean up." write_page "" -- cgit v1.2.3-70-g09d2
source packageversion in our repoversion in sidold versions our repo
(needed for reproducing old builds)
$PKG$BET$SID$BET$CSID$(echo $CRUFT|sed 's# #
#g')