# HG changeset patch # User Christophe Lincoln # Date 1245684115 -7200 # Node ID 4a6cf875fd7e44c0bf0e96b63abb0f74d79dbb08 # Parent df87c33c0cc610370e45a2c70759525e14667a69 tazbb: update package stats after each build diff -r df87c33c0cc6 -r 4a6cf875fd7e tazbb/stuff/tazbb --- a/tazbb/stuff/tazbb Mon Jun 22 10:50:56 2009 +0000 +++ b/tazbb/stuff/tazbb Mon Jun 22 17:21:55 2009 +0200 @@ -22,7 +22,7 @@ echo -e "\nYou must be root to run: `basename $0`.\n" && exit 0 fi -# Let tazbb finish its work and make sure needed files exist. +# Let tazbb finish is work and make sure needed files exist. if [ -f $LOCK_FILE ]; then case $1 in usage|list-*|*block) @@ -43,7 +43,7 @@ \033[1mCommands: \033[0m\n usage Print this short usage and command list. list-pkgs List last cooked packages with date. - report Run in report mode and don't cook anything [--verbose]. + report Run in report mode and dont cook anything [--verbose]. cook-all Cook all missing, modified or unbuilt packages. cook-commit Cook all packages affected by a commit in the last update. test-pkgs Execute a test suite on all packages [--verbose]. @@ -129,10 +129,11 @@ echo -e "Build wok : $BUILD_WOK ($LAST_REV)\n" top_summary # Copy Hg wok if new revision or exit to stop process since nothing - # has changed (--forced can be used). + # have change (--forced can be used). if [ "$NEW_REV" != "$LAST_REV" ]; then size=`du -sh $HG_WOK | awk '{ print $1 }'` echo -n "Copying Hg wok to the build wok ($size)... " + #rsync -r -n -t $HG_WOK/ $BUILD_WOK/ cp -a $HG_WOK/* $BUILD_WOK cp -a $HG_WOK/.hg $BUILD_WOK echo -e "Done\n" @@ -169,13 +170,13 @@ echo "Blocked : $PACKAGE ($VERSION)" && continue fi - # Bristuff hack until the receipts are improved... + # Bristuff hack until the receipt are improved... #[ "$VERSION" = "bristuff" ] && VERSION=`get_version` if [ "$VERSION" = "bristuff" ]; then . $BUILD_WOK/$PACKAGE/taz/*/receipt fi - # First check if package exists. Package naming _must_ be in the form of: + # First check if package exit. Package naming _must_ be in the form of: # $PACKAGE-$VERSION or $PACKAGE-${VERSION}$EXTRAVERSION (Kernel string). if [ ! -f $PACKAGES_REPOSITORY/$PACKAGE-$VERSION.tazpkg ]; then [ -z "$EXTRAVERSION" ] && EXTRAVERSION="_$KERNEL" @@ -198,14 +199,14 @@ fi done fi - # Now check if package is built and not already on the list. + # Now check if package is built and not already in the list. if [ ! -d $BUILD_WOK/$PACKAGE/taz ] && ! grep -q $PACKAGE $DB_DIR/cooklist; then [ "$1" = "report" ] && echo "Unbuilt : $PACKAGE ($VERSION)" echo "Unbuilt : $PACKAGE ($VERSION)" >> $DB_DIR/report echo "$PACKAGE" >> $DB_DIR/cooklist fi # Rebuild unbuilt packages list with link to log file. This list - # is also generated by cook_install to have real time stats. + # is also generated by cook_inslall to have real time stats. if [ ! -d $BUILD_WOK/$PACKAGE/taz ]; then echo "$PACKAGE" \ >> $DB_DIR/unbuilt @@ -214,7 +215,7 @@ packages_summary } -# Create a new cooklist and summary (don't modify report) so 'tazbb cook-commit' +# Create a new cooklist and summary (dont modify report) so 'tazbb cook-commit' # can cook last changes. check_commit() { @@ -223,7 +224,7 @@ # Clean up last results. rm -f $DB_DIR/cooklist && touch $DB_DIR/cooklist # Get the name of modified packages by the revision range. +1 last - # commit was built by the previous build. + # commit was build by the previous build. LAST_REV=$(($LAST_REV+1)) echo -e "Will cook from revision $LAST_REV to $NEW_REV\n" for file in `hg log --rev=$LAST_REV:$NEW_REV --template '{files}\n'` @@ -253,7 +254,7 @@ tazwok clean $pkg script -c "echo 'install' | tazwok cook $pkg" $LOG_DIR/$pkg.log # Install new package (important for new shared libs). Note - # that tests are done separately with 'test_packages' and should + # that tests are done separatly with 'test_packages' and should # be done by tazwok. if [ -f $BUILD_WOK/$pkg/taz/*/receipt ]; then . $BUILD_WOK/$pkg/taz/*/receipt @@ -270,13 +271,14 @@ # Remove package from the cooklist and empty lines for HTML
.
 		sed -i /"^$pkg$"/d $DB_DIR/cooklist
 		sed -i '/^$/d' $DB_DIR/cooklist
+		packages_summary_update
 	done
 }
 
 # Remove old packages in the build wok and clean pkgs repository. The
 # Hg wok is copied into the build wok so packages removed by hg must be
 # removed. To remove old packages in the repository we look into the
-# build wok and don't remove unbuilt packages. Clean-up will also remove
+# build wok and dont remove unbuilt packages. Clean-up will also remove
 # all corrupted packages.
 clean_up()
 {
@@ -472,10 +474,10 @@
 		blocked_urls
 		echo "" ;;
 	test-pkgs)
-		# Start a test suite on all built packages.
+		# Start a test suite on all builded packages.
 		test_packages $@ ;;
 	test-suite)
-		# Start a test suite on all built packages and the wok using
+		# Start a test suite on all builded package and the wok using
 		# the great 'tazwok check'.
 		#
 		# test_packages > $LOG_DIR/test-suite.log