wok-stable rev 3537
tazbb: update package stats after each build
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Jun 22 17:21:55 2009 +0200 (2009-06-22) |
parents | df87c33c0cc6 |
children | 0952ca2f11ff |
files | tazbb/stuff/tazbb |
line diff
1.1 --- a/tazbb/stuff/tazbb Mon Jun 22 10:50:56 2009 +0000 1.2 +++ b/tazbb/stuff/tazbb Mon Jun 22 17:21:55 2009 +0200 1.3 @@ -22,7 +22,7 @@ 1.4 echo -e "\nYou must be root to run: `basename $0`.\n" && exit 0 1.5 fi 1.6 1.7 -# Let tazbb finish its work and make sure needed files exist. 1.8 +# Let tazbb finish is work and make sure needed files exist. 1.9 if [ -f $LOCK_FILE ]; then 1.10 case $1 in 1.11 usage|list-*|*block) 1.12 @@ -43,7 +43,7 @@ 1.13 \033[1mCommands: \033[0m\n 1.14 usage Print this short usage and command list. 1.15 list-pkgs List last cooked packages with date. 1.16 - report Run in report mode and don't cook anything [--verbose]. 1.17 + report Run in report mode and dont cook anything [--verbose]. 1.18 cook-all Cook all missing, modified or unbuilt packages. 1.19 cook-commit Cook all packages affected by a commit in the last update. 1.20 test-pkgs Execute a test suite on all packages [--verbose]. 1.21 @@ -129,10 +129,11 @@ 1.22 echo -e "Build wok : $BUILD_WOK ($LAST_REV)\n" 1.23 top_summary 1.24 # Copy Hg wok if new revision or exit to stop process since nothing 1.25 - # has changed (--forced can be used). 1.26 + # have change (--forced can be used). 1.27 if [ "$NEW_REV" != "$LAST_REV" ]; then 1.28 size=`du -sh $HG_WOK | awk '{ print $1 }'` 1.29 echo -n "Copying Hg wok to the build wok ($size)... " 1.30 + #rsync -r -n -t $HG_WOK/ $BUILD_WOK/ 1.31 cp -a $HG_WOK/* $BUILD_WOK 1.32 cp -a $HG_WOK/.hg $BUILD_WOK 1.33 echo -e "Done\n" 1.34 @@ -169,13 +170,13 @@ 1.35 echo "Blocked : $PACKAGE ($VERSION)" && continue 1.36 fi 1.37 1.38 - # Bristuff hack until the receipts are improved... 1.39 + # Bristuff hack until the receipt are improved... 1.40 #[ "$VERSION" = "bristuff" ] && VERSION=`get_version` 1.41 if [ "$VERSION" = "bristuff" ]; then 1.42 . $BUILD_WOK/$PACKAGE/taz/*/receipt 1.43 fi 1.44 1.45 - # First check if package exists. Package naming _must_ be in the form of: 1.46 + # First check if package exit. Package naming _must_ be in the form of: 1.47 # $PACKAGE-$VERSION or $PACKAGE-${VERSION}$EXTRAVERSION (Kernel string). 1.48 if [ ! -f $PACKAGES_REPOSITORY/$PACKAGE-$VERSION.tazpkg ]; then 1.49 [ -z "$EXTRAVERSION" ] && EXTRAVERSION="_$KERNEL" 1.50 @@ -198,14 +199,14 @@ 1.51 fi 1.52 done 1.53 fi 1.54 - # Now check if package is built and not already on the list. 1.55 + # Now check if package is built and not already in the list. 1.56 if [ ! -d $BUILD_WOK/$PACKAGE/taz ] && ! grep -q $PACKAGE $DB_DIR/cooklist; then 1.57 [ "$1" = "report" ] && echo "Unbuilt : $PACKAGE ($VERSION)" 1.58 echo "Unbuilt : $PACKAGE ($VERSION)" >> $DB_DIR/report 1.59 echo "$PACKAGE" >> $DB_DIR/cooklist 1.60 fi 1.61 # Rebuild unbuilt packages list with link to log file. This list 1.62 - # is also generated by cook_install to have real time stats. 1.63 + # is also generated by cook_inslall to have real time stats. 1.64 if [ ! -d $BUILD_WOK/$PACKAGE/taz ]; then 1.65 echo "<a href=\"log.php?package=$PACKAGE\">$PACKAGE</a>" \ 1.66 >> $DB_DIR/unbuilt 1.67 @@ -214,7 +215,7 @@ 1.68 packages_summary 1.69 } 1.70 1.71 -# Create a new cooklist and summary (don't modify report) so 'tazbb cook-commit' 1.72 +# Create a new cooklist and summary (dont modify report) so 'tazbb cook-commit' 1.73 # can cook last changes. 1.74 check_commit() 1.75 { 1.76 @@ -223,7 +224,7 @@ 1.77 # Clean up last results. 1.78 rm -f $DB_DIR/cooklist && touch $DB_DIR/cooklist 1.79 # Get the name of modified packages by the revision range. +1 last 1.80 - # commit was built by the previous build. 1.81 + # commit was build by the previous build. 1.82 LAST_REV=$(($LAST_REV+1)) 1.83 echo -e "Will cook from revision $LAST_REV to $NEW_REV\n" 1.84 for file in `hg log --rev=$LAST_REV:$NEW_REV --template '{files}\n'` 1.85 @@ -253,7 +254,7 @@ 1.86 tazwok clean $pkg 1.87 script -c "echo 'install' | tazwok cook $pkg" $LOG_DIR/$pkg.log 1.88 # Install new package (important for new shared libs). Note 1.89 - # that tests are done separately with 'test_packages' and should 1.90 + # that tests are done separatly with 'test_packages' and should 1.91 # be done by tazwok. 1.92 if [ -f $BUILD_WOK/$pkg/taz/*/receipt ]; then 1.93 . $BUILD_WOK/$pkg/taz/*/receipt 1.94 @@ -270,13 +271,14 @@ 1.95 # Remove package from the cooklist and empty lines for HTML <pre>. 1.96 sed -i /"^$pkg$"/d $DB_DIR/cooklist 1.97 sed -i '/^$/d' $DB_DIR/cooklist 1.98 + packages_summary_update 1.99 done 1.100 } 1.101 1.102 # Remove old packages in the build wok and clean pkgs repository. The 1.103 # Hg wok is copied into the build wok so packages removed by hg must be 1.104 # removed. To remove old packages in the repository we look into the 1.105 -# build wok and don't remove unbuilt packages. Clean-up will also remove 1.106 +# build wok and dont remove unbuilt packages. Clean-up will also remove 1.107 # all corrupted packages. 1.108 clean_up() 1.109 { 1.110 @@ -472,10 +474,10 @@ 1.111 blocked_urls 1.112 echo "" ;; 1.113 test-pkgs) 1.114 - # Start a test suite on all built packages. 1.115 + # Start a test suite on all builded packages. 1.116 test_packages $@ ;; 1.117 test-suite) 1.118 - # Start a test suite on all built packages and the wok using 1.119 + # Start a test suite on all builded package and the wok using 1.120 # the great 'tazwok check'. 1.121 # 1.122 # test_packages > $LOG_DIR/test-suite.log