head 1.34; access; symbols RELEASE_7_4_0:1.33 RELEASE_8_2_0:1.33 RELEASE_6_EOL:1.33 RELEASE_8_1_0:1.31 RELEASE_7_3_0:1.26 RELEASE_8_0_0:1.24 RELEASE_7_2_0:1.22 RELEASE_7_1_0:1.22 RELEASE_6_4_0:1.22 RELEASE_5_EOL:1.20 RELEASE_7_0_0:1.19 RELEASE_6_3_0:1.19 PRE_XORG_7:1.17 RELEASE_4_EOL:1.14 RELEASE_6_2_0:1.13; locks; strict; comment @# @; 1.34 date 2011.04.24.16.37.51; author flz; state dead; branches; next 1.33; 1.33 date 2010.08.16.23.59.32; author linimon; state Exp; branches; next 1.32; 1.32 date 2010.08.16.09.17.05; author linimon; state Exp; branches; next 1.31; 1.31 date 2010.06.28.01.59.25; author linimon; state Exp; branches; next 1.30; 1.30 date 2010.06.25.23.20.14; author linimon; state Exp; branches; next 1.29; 1.29 date 2010.05.25.20.08.56; author linimon; state Exp; branches; next 1.28; 1.28 date 2010.05.25.07.37.48; author linimon; state Exp; branches; next 1.27; 1.27 date 2010.05.20.04.04.24; author linimon; state Exp; branches; next 1.26; 1.26 date 2010.02.19.16.15.58; author linimon; state Exp; branches; next 1.25; 1.25 date 2009.11.17.04.49.41; author linimon; state Exp; branches; next 1.24; 1.24 date 2009.08.23.10.08.15; author linimon; state Exp; branches; next 1.23; 1.23 date 2009.06.03.03.42.30; author linimon; state Exp; branches; next 1.22; 1.22 date 2008.09.18.06.01.57; author linimon; state Exp; branches; next 1.21; 1.21 date 2008.09.17.18.01.07; author linimon; state Exp; branches; next 1.20; 1.20 date 2007.12.23.17.50.29; author linimon; state Exp; branches; next 1.19; 1.19 date 2007.10.16.00.37.03; author linimon; state Exp; branches; next 1.18; 1.18 date 2007.07.22.04.36.49; author linimon; state Exp; branches; next 1.17; 1.17 date 2007.03.23.05.49.49; author linimon; state Exp; branches; next 1.16; 1.16 date 2007.03.09.02.43.55; author linimon; state Exp; branches; next 1.15; 1.15 date 2007.02.07.08.00.20; author linimon; state Exp; branches; next 1.14; 1.14 date 2006.11.25.15.51.02; author linimon; state Exp; branches; next 1.13; 1.13 date 2006.09.23.07.44.34; author linimon; state Exp; branches; next 1.12; 1.12 date 2006.09.23.05.39.53; author linimon; state Exp; branches; next 1.11; 1.11 date 2006.07.13.03.52.28; author linimon; state Exp; branches; next 1.10; 1.10 date 2006.07.08.04.09.42; author linimon; state Exp; branches; next 1.9; 1.9 date 2006.07.08.03.33.51; author linimon; state Exp; branches; next 1.8; 1.8 date 2006.07.08.03.33.06; author linimon; state Exp; branches; next 1.7; 1.7 date 2006.07.06.04.54.53; author linimon; state Exp; branches; next 1.6; 1.6 date 2006.07.05.23.30.42; author linimon; state Exp; branches; next 1.5; 1.5 date 2006.07.05.23.29.45; author linimon; state Exp; branches; next 1.4; 1.4 date 2006.07.05.23.17.53; author linimon; state Exp; branches; next 1.3; 1.3 date 2006.06.28.22.46.18; author linimon; state Exp; branches; next 1.2; 1.2 date 2006.06.28.04.27.43; author linimon; state Exp; branches; next 1.1; 1.1 date 2006.06.27.05.31.32; author linimon; state Exp; branches; next ; desc @@ 1.34 log @Remove portbuild scripts from pcvs, as they now live in svn/projects. @ text @#!/bin/sh # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.33 2010/08/16 23:59:32 linimon Exp $ # # create HTML showing numbers of packages vs errors. Run this in a directory # accessible to the web server. # pb=/var/portbuild . ${pb}/conf/server.conf here=`pwd` tmp=`basename $0 | sed -e "s/^do//"`".html" OUTFILE="${here}/${tmp}" TMPFILE="${here}/.${tmp}" #journalname="make" journalname="journal" # stylesheet seems like overkill for something this simple TABLEBGCOLOR="#F0F0F0" THCOLOR="#E0E0FF" TDCOLOR_DONE="lightgreen" TDCOLOR_NOT_DONE="lightyellow" # subroutines write_header () { echo "" > ${TMPFILE} echo "" >> ${TMPFILE} echo "FreeBSD package building statistics" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "

FreeBSD package building statistics

" >> ${TMPFILE} echo "

as of `date`

" >> ${TMPFILE} } write_table_begin () { echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} # MCL removed 20090808 -- this takes way too long # echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} } write_row () { # first, gather data arch=$1 build=$2 directory=${pb}/${arch}/${build}/builds/latest journal=${directory}/${journalname} branch=`echo $build | awk -F '-' '{print $1}'` if [ "$branch" = "4" ]; then indexfile=$directory/ports/INDEX else indexfile=$directory/ports/INDEX-$branch fi # work around the fact that 5-exp is really 6-exp-prime if [ ! -f $indexfile ]; then if [ -d $directory/ports ]; then indexfile=$directory/ports/`cd $directory/ports 2> /dev/null && ls INDEX* 2> /dev/null | head -1` else # work around the fact that 4 is EOL and thus has no ports/ directory indexfile=$directory/logs/`cd $directory/logs 2> /dev/null && ls INDEX* 2> /dev/null | head -1` fi fi # column: date of ports update have_updated="" updated="" if [ -f $directory/ports/.updated ]; then updated="$(cat $directory/ports/.updated | awk '{printf("%s %s\n",$2,$3)}')" if [ ! -z "$updated" ]; then have_updated="yes" fi fi # column: datestamp and URL of latest log have_latest="" latest="" # MCL removed 20090808 -- this takes way too long # if [ -d $directory/logs ]; then # latest_suffix="$(cd $directory/logs 2> /dev/null && ls -rtTl | grep '\.log' | tail -1 | awk '{printf("%s\">%s %s\n",$10,$6,$7)}')" # if [ -z "$latest_suffix" ]; then # latest="" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} # MCL removed 20090808 -- this takes way too long # echo "" >> ${TMPFILE} # note: ports/INDEX-n is copied to a file called errorlogs/INDEX echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} } write_table_end () { echo "
 updatedlatest logINDEXbuild logspackageserrorsskippednot yet builtqueue lengthrunning?completed?
$arch-$build" >> ${TMPFILE} if [ ! -z "$have_updated" ]; then echo "" >> ${TMPFILE} echo "$updated" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} # if [ ! -z "$have_latest" ]; then # echo "$latest" >> ${TMPFILE} # else # echo " " >> ${TMPFILE} # fi # echo "" >> ${TMPFILE} if [ ! -z "$have_index" ]; then echo "" >> ${TMPFILE} echo "$n_index" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} if [ ! -z "$have_logs" ]; then echo "" >> ${TMPFILE} echo "$n_logs" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} if [ ! -z "$have_packages" ]; then echo "" >> ${TMPFILE} echo "$n_packages" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} if [ ! -z "$have_errors" ]; then echo "" >> ${TMPFILE} echo "$n_errors" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} if [ ! -z "$have_duds" ]; then echo "" >> ${TMPFILE} echo "$n_duds" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} if [ ! -z "$m_not_yet_built" ]; then echo "$n_not_yet_built" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} if [ ! -z "$queue_length" ]; then echo "$queue_length" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "$running_flag$completed_flag
" >> ${TMPFILE} echo "
" >> ${TMPFILE} } write_footer () { echo "

explanation of columns:

" >> ${TMPFILE} echo "" >> ${TMPFILE} # no longer true 20080917 # echo "

notes:

" >> ${TMPFILE} # echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} } # main write_header # display all the mainstream builds first # (i.e. where build = branch, e.g. "7", "10") for arch in ${SUPPORTED_ARCHS}; do cd ${pb}/${arch} builds=`ls | \ grep "${SRC_BRANCHES_PATTERN}$" | \ sort -n` if [ ! -z "$builds" ]; then write_table_begin for build in ${builds}; do write_row ${arch} ${build} done write_table_end fi done # then display all the non-mainstream builds (probably only of interest # to portmgr; would break up the logical flow of the above) # examples: 8.1; 8-exp; 8-exp-gettext; 8.1R for arch in ${SUPPORTED_ARCHS}; do cd ${pb}/${arch} branches=`ls | \ grep "${SRC_BRANCHES_PATTERN}[-\.]" | \ sed -e "s@@[-\.].*@@@@" | \ uniq | \ sort -n` if [ ! -z "$branches" ]; then for branch in $branches; do builds=`ls -d $branch* | \ grep -v "${SRC_BRANCHES_PATTERN}$" | \ sort` if [ ! -z "$builds" ]; then write_table_begin for build in ${builds}; do write_row ${arch} ${build} done write_table_end fi done fi done write_footer mv -f ${TMPFILE} ${OUTFILE} @ 1.33 log @Fix it for real this time. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.32 2010/08/16 09:17:05 linimon Exp $ @ 1.32 log @Restore the display of statistics for non-mainline runs. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.31 2010/06/28 01:59:25 linimon Exp $ d11 4 a14 2 OUTFILE=`basename $0 | sed -e "s/^do//"`".html" TMPFILE=.${OUTFILE} d41 1 a41 1 echo " " >> ${TMPFILE} d338 2 a339 1 builds=`ls ${pb}/${arch} | \ d358 2 a359 1 branches=`ls ${pb}/${arch} | \ d361 2 d366 2 a367 2 builds=`ls ${pb}/${arch}/$branch* | \ grep "${SRC_BRANCHES_PATTERN}[-\.]" | \ @ 1.31 log @Correct the URLs; 'http://' is not included in MASTER_URL. Feature safe: yes @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.30 2010/06/25 23:20:14 linimon Exp $ d359 1 a359 1 for branch in branches; do @ 1.30 log @Generalize the packge building scripts to be able to be run on more than one 'head' node, rather than just pointyhat itself. Constants are factored out into installation-specific files known as portbuild/conf/server.conf and portbuild/conf/client.conf. There is only one server.conf file. Individual directories may have their own client.conf files, or may symlink to ../conf/client.conf. Several bugs are fixed and improvements are made: - the name of the journal is changed from 'make' (ew) to 'journal'. - 'cvsdate' is replaced by the more accurate name '.updated' and documentation adjusted to match. - make it more clear that '.updated' means 'ports tree updated' instead of 'src tree updated' (although the same filename is used for both). - correctly handle the general case of non-mainstream branches (e.g. "7-exp") without hardcoding "-exp". Feature safe: yes @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.29 2010/05/25 20:08:56 linimon Exp $ d96 1 a96 1 # latest="
" >> ${TMPFILE} d232 1 a232 1 echo "" >> ${TMPFILE} d241 1 a241 1 echo "" >> ${TMPFILE} d250 1 a250 1 echo "" >> ${TMPFILE} d259 1 a259 1 echo "" >> ${TMPFILE} d268 1 a268 1 echo "" >> ${TMPFILE} @ 1.29 log @Eliminate some more hardcoding. Expand the pattern for "non-mainstream" builds to also catch \., not just \-. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.28 2010/05/25 07:37:48 linimon Exp $ d8 2 a9 5 # alpha is obsolete SUPPORTED_ARCHS="amd64 i386 ia64 powerpc sparc64" # 4 and 5 are obsolete SUPPORTED_BUILDS_PATTERN="^[67891]" ROOT_DIRECTORY=/var/portbuild d14 2 a15 2 # TODO change this to 'journal' journalname="make" d40 1 a40 1 echo "cvs date" >> ${TMPFILE} d60 1 a60 1 directory=${ROOT_DIRECTORY}/${arch}/${build}/builds/latest d79 7 a85 7 # column: date of CVS checkout have_cvsdone="" cvsdone="" if [ -f $directory/cvsdone ]; then cvsdone="$(cat $directory/cvsdone | awk '{printf("%s %s\n",$2,$3)}')" if [ ! -z "$cvsdone" ]; then have_cvsdone="yes" d96 1 a96 1 # latest="" >> ${TMPFILE} echo "$cvsdone" >> ${TMPFILE} d232 1 a232 1 echo "" >> ${TMPFILE} d241 1 a241 1 echo "" >> ${TMPFILE} d250 1 a250 1 echo "" >> ${TMPFILE} d259 1 a259 1 echo "" >> ${TMPFILE} d268 1 a268 1 echo "" >> ${TMPFILE} d307 2 a308 2 echo "
  • cvs date is the date of the latest CVS checkout done by the script. It may be inaccurate if a manual checkout was done later.
  • " >> ${TMPFILE} echo "
  • INDEX is number of ports in the INDEX file built from the latest cvs checkout.
  • " >> ${TMPFILE} d333 1 d336 3 a338 3 builds=`ls ${ROOT_DIRECTORY}/${arch} | \ grep "${SUPPORTED_BUILDS_PATTERN}$" | \ sort` d342 3 a344 3 for build in ${builds}; do write_row ${arch} ${build} done d352 1 d355 14 a368 5 builds=`ls ${ROOT_DIRECTORY}/${arch} | \ grep "${SUPPORTED_BUILDS_PATTERN}[-\.]" | \ sort` if [ ! -z "$builds" ]; then write_table_begin d370 3 a372 5 for build in ${builds}; do write_row ${arch} ${build} done write_table_end @ 1.28 log @Remove the hard-coding of '-exp'. While here, factor out some other hardcoding to defines. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.27 2010/05/20 04:04:24 linimon Exp $ d175 1 a175 1 # the last grep eliminates false positive of i386-6-exp for i386-6; d338 3 a340 1 builds=`ls ${ROOT_DIRECTORY}/${arch} | grep "${SUPPORTED_BUILDS_PATTERN}$" | sort` d352 2 a353 2 # then display all -exp builds (probably only of interest to portmgr; # would break up the logical flow of the above) d356 3 a358 1 builds=`ls ${ROOT_DIRECTORY}/${arch} | grep "${SUPPORTED_BUILDS_PATTERN}-" | sort` @ 1.27 log @Refactor things a bit. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.26 2010/02/19 16:15:58 linimon Exp $ d10 2 d17 3 d64 1 a64 2 # XXX MCL I hate this name journal=${directory}/make d66 1 a66 1 branch=`echo $build | sed -e "s/-exp//"` d338 1 a338 2 # drop 4 and 5 as obsolete builds=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[67891]$' | sort` d354 1 a354 1 builds=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[67891]-exp$' | sort` @ 1.26 log @Bring this up to date with what is in production: add 'queue length' column from pav; fix first-column formatting. Feature safe: yes @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.25 2009/11/17 04:49:41 linimon Exp $ a57 1 # MCL 20080916 d59 2 d200 3 a202 3 if [ "$completed_flag" = "N" ]; then m_not_yet_built=`tail -n 1000 /var/portbuild/$arch/$build/builds/latest/make|grep MASTER|grep Queue|tail -1|sed 's|.*remaining=|| ; s|, Queue.*||'` queue_length=`tail -n 1000 /var/portbuild/$arch/$build/builds/latest/make|grep MASTER|grep Queue|tail -1|sed 's|.*length=||'` @ 1.25 log @Properly supppress empty buildenvs. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.24 2009/08/23 10:08:15 linimon Exp $ d9 1 a9 1 SUPPORTED_ARCHS="amd64 i386 ia64 sparc64" d37 1 a37 1 echo " " >> ${TMPFILE} d47 1 d196 8 d274 1 a274 1 if [ ! -z "$have_not_yet_built" ]; then d281 8 @ 1.24 log @Turn off the 'show latest log' feature. While handy, this thrashes the disks. While here, note that there is some interest in reviving ia64 package builds. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.23 2009/06/03 03:42:30 linimon Exp $ d77 1 a77 1 have_cvsdone=0 d82 1 a82 1 have_cvsdone=1 d87 1 a87 1 have_latest=0 d92 1 a92 1 # if [ "$latest_suffix" ]; then d94 1 a94 1 # have_latest=1 d99 1 a99 1 have_index=0 d103 1 a103 1 have_index=1 d107 1 a107 1 have_logs=0 d111 1 a111 1 have_logs=1 d115 1 a115 1 have_packages=0 d121 1 a121 1 have_packages=1 d125 1 a125 1 have_errors=0 d129 1 a129 1 have_errors=1 d133 1 a133 1 have_duds=0 d137 1 a137 1 have_duds=1 d141 7 a147 7 if [ ! $have_cvsdone -a \ ! $have_latest -a \ ! $have_index -a \ ! $have_logs -a \ ! $have_packages -a \ ! $have_errors -a \ ! $have_duds ]; then d154 1 a154 1 have_not_yet_built=0 d156 4 a159 4 if [ $have_index -a \ $have_packages -a \ $have_errors -a \ $have_duds ]; then d162 1 a162 1 have_not_yet_built=1 d201 1 a201 1 if [ $have_cvsdone ]; then d211 1 a211 1 # if [ $have_latest ]; then d220 1 a220 1 if [ $have_index ]; then d229 1 a229 1 if [ $have_logs ]; then d238 1 a238 1 if [ $have_packages ]; then d247 1 a247 1 if [ $have_errors ]; then d256 1 a256 1 if [ $have_duds ]; then d265 1 a265 1 if [ $have_not_yet_built ]; then @ 1.23 log @Switch the 'skipped' column to point to duds.verbose instead of duds, now that it is available in all current builds. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.22 2008/09/18 06:01:57 linimon Exp $ d8 2 a9 2 # alpha is obsolete; ia64 is not current SUPPORTED_ARCHS="amd64 i386 sparc64" d39 2 a40 1 echo "latest log" >> ${TMPFILE} d57 1 a57 1 # XXX MCL 20080916 d89 8 a96 7 if [ -d $directory/logs ]; then latest_suffix="$(cd $directory/logs 2> /dev/null && ls -rtTl | grep '\.log' | tail -1 | awk '{printf("%s\">%s %s
    \n",$10,$6,$7)}')" if [ "$latest_suffix" ]; then latest="" >> ${TMPFILE} if [ $have_latest ]; then echo "$latest" >> ${TMPFILE} else echo " " >> ${TMPFILE} fi echo "" >> ${TMPFILE} d286 2 a287 1 echo "
  • latest log is the date of the latest logfile.
  • " >> ${TMPFILE} @ 1.22 log @Handle the rest of the edge cases; drop 5 as obsolete; cleanup. Now re-enabled on production. Approved by: portmgr (self) @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.21 2008/09/17 18:01:07 linimon Exp $ d252 1 a252 1 echo "
    " >> ${TMPFILE} @ 1.21 log @Bring this into the new portbuild world order. While here, try to suppress hrefs for non-existant files (incomplete). Approved by: portmgr (self) @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.20 2007/12/23 17:50:29 linimon Exp $ a91 2 #else # latest=" " d137 7 a143 7 if [ $have_cvsdone -eq 0 -a \ $have_latest -eq 0 -a \ $have_index -eq 0 -a \ $have_logs -eq 0 -a \ $have_packages -eq 0 -a \ $have_errors -eq 0 -a \ $have_duds -eq 0 ]; then d148 13 a160 6 # XXX MCL 20080916 use n_packages, not n_logs; individual logs can be stale # XXX MCL 20080916 OTOH, so can packages; see sparc64-5 if [ $n_index -ne 0 ]; then n_not_yet_built=`expr $n_index - $n_packages - $n_errors - $n_duds` else # index currently being rebuilt n_not_yet_built=0 d259 7 a265 1 echo "$n_not_yet_built" >> ${TMPFILE} d293 5 a297 4 echo "

    notes:

    " >> ${TMPFILE} echo "" >> ${TMPFILE} d310 2 a311 2 # drop 4 as obsolete builds=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[5-9]$' | sort` d327 1 a327 1 builds=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[1-9]-exp$' | sort` @ 1.20 log @Make the script less whiny for unpopulated builds. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.19 2007/10/16 00:37:03 linimon Exp $ d8 2 a9 2 # alpha is obsolete SUPPORTED_ARCHS="amd64 i386 ia64 sparc64" d56 3 a58 1 directory=${ROOT_DIRECTORY}/${arch}/${build} d68 1 a68 1 indexfile=$directory/ports/`cd $directory/ports&&ls INDEX* 2> /dev/null | head -1` d71 1 a71 1 indexfile=$directory/logs/`cd $directory/logs&&ls INDEX* 2> /dev/null | head -1` d76 2 a77 1 cvsdone=" " d80 2 a81 2 if [ -z "$cvsdone" ]; then cvsdone=" " d86 2 a87 1 latest=" " d89 1 a89 1 latest_suffix="$(cd $directory/logs; ls -rtTl | grep '\.log' | tail -1 | awk '{printf("%s\">%s %s
    \n",$10,$6,$7)}')" d92 3 a94 2 else latest=" " d99 1 d103 1 d107 1 d111 1 d115 1 d119 1 d123 1 d127 1 d131 1 d135 12 d150 2 d153 1 a153 1 n_not_yet_built=`expr $n_index - $n_logs - $n_errors - $n_duds` d160 2 a161 1 # the last grep eliminates false positive of i386-6-exp for i386-6 d166 1 a166 1 grep "^$arch-$build\$"` d192 7 a198 2 echo "" >> ${TMPFILE} echo "$cvsdone" >> ${TMPFILE} d200 7 a206 1 echo "$latest" >> ${TMPFILE} d210 7 a216 2 echo "" >> ${TMPFILE} echo "$n_index" >> ${TMPFILE} d219 7 a225 2 echo "" >> ${TMPFILE} echo "$n_logs" >> ${TMPFILE} d228 7 a234 2 echo "" >> ${TMPFILE} echo "$n_packages" >> ${TMPFILE} d237 7 a243 2 echo "" >> ${TMPFILE} echo "$n_errors" >> ${TMPFILE} d245 8 a252 1 echo "$n_duds" >> ${TMPFILE} @ 1.19 log @Rename 'missing' column to 'not yet built' so as not to confuse terminology with portsmon reports. Noticed by: erwin @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.18 2007/07/22 04:36:49 linimon Exp $ d66 1 a66 1 indexfile=$directory/ports/`cd $directory/ports&&ls INDEX* | head -1` d69 1 a69 1 indexfile=$directory/logs/`cd $directory/logs&&ls INDEX* | head -1` @ 1.18 log @Drop 4.X statistics. They are half-a-year stale. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.17 2007/03/23 05:49:49 linimon Exp $ d45 1 a45 1 echo "missing" >> ${TMPFILE} d123 1 a123 1 # column: missing count d125 1 a125 1 n_missing=`expr $n_index - $n_logs - $n_errors - $n_duds` d127 1 a127 1 n_missing=0 d187 1 a187 1 echo "$n_missing" >> ${TMPFILE} d210 1 a210 1 echo "
  • missing is the INDEX column minus the build logs plus the errors plus the skipped. These are packages that have not been built for one reason or another. Note: interrupted and/or restarted builds can make this number inaccurate because of the duplicates, above.
  • " >> ${TMPFILE} @ 1.17 log @Add a column for 'build logs'. This is larger than the number of the packages due to packages being trimmed by RESTRICTED. While here, note that the 'missing' column will be off by the number of duplicates in the other columns. This happens when partial builds are restarted. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.16 2007/03/09 02:43:55 linimon Exp $ d231 2 a232 1 builds=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[1-9]$' | sort` @ 1.16 log @Workaround for the fact that 4/ports is no longer populated on pointyhat. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.15 2007/02/07 08:00:20 linimon Exp $ d37 1 a37 1 echo " " >> ${TMPFILE} d41 1 d99 6 d108 1 a108 1 n_packages=`find $directory/packages/All -name \*.tbz -o -name \*.tgz |wc -l` d114 1 a114 3 # XXX MCL why doesn't this work??? #n_errors=`find $directory/errors -name \*.log -o -name \*.log.bz2 |wc -l` n_errors=`ls $directory/errors | grep '.log' | wc -l` d125 1 a125 1 n_missing=`expr $n_index - $n_packages - $n_errors - $n_duds` d175 4 d206 3 a208 2 echo "
  • packages is number of packages successfully built.
  • " >> ${TMPFILE} echo "
  • errors is number of packages that failed.
  • " >> ${TMPFILE} d210 1 a210 1 echo "
  • missing is the INDEX column minus the others. These are packages that have not been built for one reason or another. Note: interrupted and/or restarted builds can make this number inaccurate.
  • " >> ${TMPFILE} @ 1.15 log @Fix up the code for amd64-6-exp; add a column to label builds that still have processes running, and add that into the highlight logic. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.14 2006/11/25 15:51:02 linimon Exp $ d64 6 a69 1 indexfile=$directory/ports/`cd $directory/ports&&ls INDEX* | head -1` @ 1.14 log @Work around the fact that 5-exp, these days, is really another 6-exp, except in disguise. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.13 2006/09/23 07:44:34 linimon Exp $ d45 2 a46 1 echo "done?" >> ${TMPFILE} d120 14 a133 2 # column: done flag done_flag="N" d136 1 a136 1 done_flag="Y" d141 1 a141 1 if [ "$done_flag" = "Y" ]; then d175 2 a176 1 echo "$done_flag" >> ${TMPFILE} d195 3 a197 2 echo "
  • missing is the INDEX column minus the others. These are packages that have not been built for one reason or another.
  • " >> ${TMPFILE} echo "
  • done is whether that run terminated normally or not.
  • " >> ${TMPFILE} @ 1.13 log @Since we already have the data from the grep, go ahead and make the 'latest log' cell a link to it. My weak awk/sh skills are evident here, but it does the job. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.12 2006/09/23 05:39:53 linimon Exp $ d61 4 @ 1.12 log @Add links to cvsdone and INDEX files. Add some whitespace. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.11 2006/07/13 03:52:28 linimon Exp $ d71 1 a71 1 # column: datestamp of latest log d74 3 a76 4 #latest="$(cd $directory/logs; ls -rtTl | grep '\.log' | tail -1 | awk '{printf("%s %s %s %s\n",$6,$7,$8,$9)}')" latest="$(cd $directory/logs; ls -rtTl | grep '\.log' | tail -1 | awk '{printf("%s %s\n",$6,$7)}')" if [ "$latest" ]; then #latest="$latest `date '+%Z'`" @ 1.11 log @Add the cvs checkout date so people can see how long the runs take; add a comment about openoffice.org*; generalize a bit. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.10 2006/07/08 04:09:42 linimon Exp $ d133 1 d135 5 a139 1 echo "$cvsdone" >> ${TMPFILE} d141 6 a146 1 echo "$n_index" >> ${TMPFILE} d150 1 d154 1 d156 1 d158 1 d160 1 @ 1.10 log @Add the -exp builds down at the end. Probably only of interest to portmgr, so do them separately in order not to break up the ease of browsing the most important stats, above. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.9 2006/07/08 03:33:51 linimon Exp $ d12 1 a12 1 OUTFILE=packagestats.html d38 2 a39 1 echo "as of" >> ${TMPFILE} d62 9 d134 1 d157 2 a158 1 echo "
  • as of is the date of the latest logfile.
  • " >> ${TMPFILE} d167 5 @ 1.9 log @White space adjustment after refactoring. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.8 2006/07/08 03:33:06 linimon Exp $ d52 3 a54 2 branch=$2 directory=${ROOT_DIRECTORY}/${arch}/${branch} d123 1 a123 1 echo "$arch-$branch" >> ${TMPFILE} d127 1 a127 1 echo "" >> ${TMPFILE} d130 1 a130 1 echo "" >> ${TMPFILE} d163 1 a164 1 write_table_begin d166 7 a172 4 branches=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[1-9]$' | sort` for branch in ${branches}; do write_row ${arch} ${branch} done d174 18 a191 1 write_table_end @ 1.8 log @Refactor. No code change (yet). @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.7 2006/07/06 04:54:53 linimon Exp $ d24 8 a31 8 echo "" > ${TMPFILE} echo "" >> ${TMPFILE} echo "FreeBSD package building statistics" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "

    FreeBSD package building statistics

    " >> ${TMPFILE} echo "

    as of `date`

    " >> ${TMPFILE} d143 10 a152 10 echo "

    explanation of columns:

    " >> ${TMPFILE} echo "" >> ${TMPFILE} d154 2 a155 2 echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} @ 1.7 log @Add some color to the display. @ text @d2 1 a2 1 # $FreeBSD: ports/Tools/portbuild/scripts/dopackagestats,v 1.6 2006/07/05 23:30:42 linimon Exp $ d21 3 d32 1 d34 1 a34 3 for arch in ${SUPPORTED_ARCHS}; do # begin table d46 1 d48 1 a48 4 # begin row branches=`ls ${ROOT_DIRECTORY}/${arch} | grep '^[1-9]$' | sort` for branch in ${branches}; do d51 2 d135 1 d137 1 a137 2 done d140 1 d142 1 a142 2 done d156 18 @ 1.6 log @Fix CVS tag. @ text @d2 1 a2 1 # $FreeBSD$ d15 6 d33 1 a33 1 echo "" >> ${TMPFILE} d35 8 a42 8 echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} d111 7 d120 4 a123 4 echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} @ 1.5 log @Refactor. No code changes yet. @ text @d2 1 a2 1 # $FreeBSD# @ 1.4 log @Add a column for last-date stamp and clean up the formatting a bit. @ text @d43 2 a51 5 echo "" >> ${TMPFILE} # column: ARCH echo "" >> ${TMPFILE} a62 1 echo "" >> ${TMPFILE} a68 1 echo "" >> ${TMPFILE} a74 3 echo "" >> ${TMPFILE} a82 3 echo "" >> ${TMPFILE} a88 1 echo "" >> ${TMPFILE} a95 1 echo "" >> ${TMPFILE} d104 14 a118 1 @ 1.3 log @Handle the case where the size of INDEX is zero (e.g. during new builds). @ text @d30 7 a36 6 echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} d55 13 d117 1 a117 1 echo "" >> ${TMPFILE} d130 1 @ 1.2 log @Fix edit-o. @ text @d89 5 a93 1 n_missing=`expr $n_index - $n_packages - $n_errors - $n_duds` @ 1.1 log @Creates an HTML file with tables for each architecture which summarize the number of packages built vs. packages that failed, along with some other related information. @ text @d116 1 a116 1 echo "
  • missing is the INDEX column minus anothers. These are packages that have not been built for one reason or the other.
  • " >> ${TMPFILE} @
     as ofINDEXpackageserrorsskippedmissingdone?$arch-$branch$latest$n_index" >> ${TMPFILE} d126 1 a126 1 echo "" >> ${TMPFILE} d129 3 a131 3 echo "$n_duds$n_missing$done_flag
    $arch-$branch$latest$n_index" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "$n_packages" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "$n_errors$n_duds$n_missingINDEXpackageserrorsskippedmissingdone?$done_flag