From 9c1cf11d7e4c77da069df31ad96202aba2ff4add Mon Sep 17 00:00:00 2001 From: linimon Date: Fri, 23 Mar 2007 05:49:49 +0000 Subject: 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. --- Tools/portbuild/scripts/dopackagestats | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'Tools/portbuild') diff --git a/Tools/portbuild/scripts/dopackagestats b/Tools/portbuild/scripts/dopackagestats index 0eb93483fcfe..1967ee023d89 100755 --- a/Tools/portbuild/scripts/dopackagestats +++ b/Tools/portbuild/scripts/dopackagestats @@ -34,10 +34,11 @@ write_header () { write_table_begin () { echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} - echo "" >> ${TMPFILE} + echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} + echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} echo "" >> ${TMPFILE} @@ -95,18 +96,22 @@ write_row () { n_index=`cat $indexfile | wc -l` fi + # column: buildlog count + n_logs=0 + if [ -d $directory/logs ]; then + n_logs=`ls $directory/logs | grep '\.log' | wc -l` + fi + # column: package count n_packages=0 if [ -d $directory/packages/All ]; then - n_packages=`find $directory/packages/All -name \*.tbz -o -name \*.tgz |wc -l` + n_packages=`find $directory/packages/All -name \*.tbz -or -name \*.tgz |wc -l` fi # column: error count n_errors=0 if [ -d $directory/errors ]; then - # 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` + n_errors=`ls $directory/errors | grep '\.log' | wc -l` fi # column: duds count @@ -117,7 +122,7 @@ write_row () { # column: missing count if [ $n_index -ne 0 ]; then - n_missing=`expr $n_index - $n_packages - $n_errors - $n_duds` + n_missing=`expr $n_index - $n_logs - $n_errors - $n_duds` else # index currently being rebuilt n_missing=0 fi @@ -167,6 +172,10 @@ write_row () { echo "" >> ${TMPFILE} + + echo "" >> ${TMPFILE} echo "
  cvs datelatest logINDEXbuild logspackageserrorsskipped" >> ${TMPFILE} echo "" >> ${TMPFILE} + echo "$n_logs" >> ${TMPFILE} + echo "" >> ${TMPFILE} echo "$n_packages" >> ${TMPFILE} @@ -194,10 +203,11 @@ write_footer () { echo "
  • latest log is the date of the latest logfile.
  • " >> ${TMPFILE} 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} - echo "
  • packages is number of packages successfully built.
  • " >> ${TMPFILE} - echo "
  • errors is number of packages that failed.
  • " >> ${TMPFILE} + echo "
  • build logs is number of packages attempted. Note: if a run was restarted, you may see duplicates here.
  • " >> ${TMPFILE} + echo "
  • packages is number of packages successfully built. Note: if a run was restarted, you may see duplicates here.
  • " >> ${TMPFILE} + echo "
  • errors is number of packages that failed. Note: if a run was restarted, you may see duplicates here.
  • " >> ${TMPFILE} echo "
  • skipped is number of packages that were skipped due to NO_PACKAGE, IGNORE, BROKEN, FORBIDDEN, and so forth (\"duds\" file).
  • " >> ${TMPFILE} - 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} + 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} echo "
  • running is whether there are still processes running.
  • " >> ${TMPFILE} echo "
  • completed is whether that build terminated normally or not, as seen from the logfile.
  • " >> ${TMPFILE} echo "" >> ${TMPFILE} -- cgit