# HG changeset patch # User Antoine Bodin # Date 1286410189 -7200 # Node ID 40dc53a88848a76abfb8d603e3e691ae35478fc3 # Parent 95882644e965f548f01764296304ec759576d71a Disable chain-cook & add +build option for genpkg only diff -r 95882644e965 -r 40dc53a88848 tazbb/stuff/tazbb --- a/tazbb/stuff/tazbb Wed Oct 06 05:39:56 2010 +0000 +++ b/tazbb/stuff/tazbb Thu Oct 07 02:09:49 2010 +0200 @@ -95,7 +95,8 @@ if ! grep -q "^Packages" $DB_DIR/summary; then cat >> $DB_DIR/summary << _EOT_ Packages : `ls $BUILD_WOK | wc -l` in the wok, `cat $DB_DIR/cooklist | wc -l` to cook, \ -`cat $DB_DIR/blocked | wc -l` blocked, `cat $DB_DIR/corrupted | wc -l` corrupted +`cat $DB_DIR/genpkglist | wc -l` to repack, `cat $DB_DIR/blocked | wc -l` blocked, \ +`cat $DB_DIR/corrupted | wc -l` corrupted _EOT_ fi } @@ -108,6 +109,8 @@ $DB_DIR/summary sed -i s/"[0-9]* to cook"/"`cat $DB_DIR/cooklist | wc -l` to cook"/ \ $DB_DIR/summary + sed -i s/"[0-9]* to repack"/"`cat $DB_DIR/genpkglist | wc -l` to repack"/ \ + $DB_DIR/summary sed -i s/"[0-9]* blocked"/"`cat $DB_DIR/blocked | wc -l` blocked"/ \ $DB_DIR/summary sed -i s/"[0-9]* corrupted"/"`cat $DB_DIR/corrupted | wc -l` corrupted"/ \ @@ -130,6 +133,9 @@ echo "Cooklist" echo "================================================================================" cat $DB_DIR/cooklist && echo "" + echo "Genpkglist" + echo "================================================================================" + cat $DB_DIR/genpkglist && echo "" echo "Packlist" echo "================================================================================" cat $DB_DIR/packlist && echo "" @@ -281,6 +287,7 @@ { # Clean up last results. rm -f $DB_DIR/cooklist && touch $DB_DIR/cooklist + rm -f $DB_DIR/genpkglist && touch $DB_DIR/genpkglist rm -f $DB_DIR/report && touch $DB_DIR/report rm -f $DB_DIR/unbuilt && touch $DB_DIR/unbuilt echo "Checking all files in: $HG_WOK" @@ -324,34 +331,30 @@ FILE_YEAR=`date -u -r $file '+%Y'` FILE_DATE=`date -u -r $file '+%m%d%H%M'` [ "$2" = "--verbose" ] && echo " -> Checking: $file" - if [ "$FILE_YEAR" -ge "$PKG_YEAR" -a "$FILE_DATE" -gt "$PKG_DATE" ] && ! grep -q $PACKAGE $DB_DIR/cooklist; then + if [ "$FILE_YEAR" -ge "$PKG_YEAR" -a "$FILE_DATE" -gt "$PKG_DATE" ] && ! grep -q $PACKAGE $DB_DIR/cooklist && ! grep -q $PACKAGE $DB_DIR/genpkglist; then [ "$1" = "report" ] && echo "Refresh : $PACKAGE ($VERSION)" echo "Refresh : $PACKAGE ($VERSION)" >> $DB_DIR/report echo "$PACKAGE" >> $DB_DIR/cooklist fi done fi - # 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 - if ! grep -q $PACKAGE $DB_DIR/cooklist; then - case " $TOOLCHAIN " in - *\ $PACKAGE\ *) continue;; - esac - case "$PACKAGE" in - tazbb|tazwok|tazpkg) continue;; - esac - for dep in $BUILD_DEPENDS $TOOLCHAIN ; do - [ $BUILD_WOK/$PACKAGE/taz -nt $BUILD_WOK/$dep/taz ] && continue - [ "$1" = "report" ] && echo "Refresh : $PACKAGE (older than $dep)" - echo "Refresh : $PACKAGE (older than $dep)" >> $DB_DIR/report - echo "$PACKAGE" >> $DB_DIR/cooklist - break - done - fi + + # Desactivate this feature because it create infinite cooking loops. + #if ! grep -q $PACKAGE $DB_DIR/cooklist; then + # case " $TOOLCHAIN " in + # *\ $PACKAGE\ *) continue;; + # esac + # case "$PACKAGE" in + # tazbb|tazwok|tazpkg) continue;; + # esac + # for dep in $BUILD_DEPENDS $TOOLCHAIN ; do + # [ $BUILD_WOK/$PACKAGE/taz -nt $BUILD_WOK/$dep/taz ] && continue + # [ "$1" = "report" ] && echo "Refresh : $PACKAGE (older than $dep)" + # echo "Refresh : $PACKAGE (older than $dep)" >> $DB_DIR/report + # echo "$PACKAGE" >> $DB_DIR/cooklist + # break + # done + #fi # Rebuild unbuilt packages list with link to log file. This list # is also generated by cook_inslall to have real time stats. if [ ! -d $BUILD_WOK/$PACKAGE/taz ]; then @@ -374,20 +377,47 @@ # 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'` - do - pkg=`echo $file | cut -d "/" -f 1` - if ! grep -q ^$pkg$ $DB_DIR/cooklist; then - if [ -f $pkg/receipt ]; then - . $pkg/receipt - echo "Commit : $PACKAGE ($VERSION)" >> $DB_DIR/report - echo "$PACKAGE" >> $DB_DIR/cooklist + for rev in $(seq $LAST_REV $NEW_REV); do + hg_log=$(hg log --rev=$rev --template "{files}\t{desc}\n") + for file in $(echo "$hg_log" | cut -f 1); do + pkg=`echo $file | cut -d "/" -f 1` + if [ "$(echo $hg_log | grep -i '+build')" ]; then + if ! grep -q ^$pkg$ $DB_DIR/genpkglist && ! grep -q ^$pkg$ $DB_DIR/cooklist; then + if [ -f $pkg/receipt ]; then + . $pkg/receipt + echo "Commit : $PACKAGE ($VERSION) - genpkg only" >> $DB_DIR/report + echo "$PACKAGE" >> $DB_DIR/genpkglist + fi + fi + else + if ! grep -q ^$pkg$ $DB_DIR/cooklist; then + if [ -f $pkg/receipt ]; then + . $pkg/receipt + echo "Commit : $PACKAGE ($VERSION)" >> $DB_DIR/report + sed "/^$PACKAGE$/d" -i $DB_DIR/genpkglist + echo "$PACKAGE" >> $DB_DIR/cooklist + fi + fi fi - fi + done done packages_summary } +# Genpkg : don't regen the package if source _pkg is missing, this +# function re-generate the package only if all is fine, else it +# does nothing and forget the package. +genpkg_package() +{ + EXTRAVERSION="" + DEPENDS="" + BUILD_DEPENDS="" + SOURCE="" + WANTED="" + echo "(Repack $pkg)" > $DB_DIR/running + tazwok check-receipt $pkg && echo 'N' | tazwok genpkg $pkg +} + # Cook one package cook_package() { @@ -476,6 +506,16 @@ # Here we cook all packages found in the cooklist. cook_install() { + # First repack packages in genpkglist + for pkg in `cat $DB_DIR/genpkglist`; do + genpkg_package $pkg + + # Remove package from the genpkglist and empty lines for HTML
.
+		sed -i /"^$pkg$"/d $DB_DIR/genpkglist
+		sed -i '/^$/d' $DB_DIR/genpkglist
+		packages_summary_update
+	done		
+	
 	echo "" > $DB_DIR/unbuilt
 	for pkg in `cat $DB_DIR/cooklist | sort_cook_list`
 	do
diff -r 95882644e965 -r 40dc53a88848 tazbb/stuff/web/index.php
--- a/tazbb/stuff/web/index.php	Wed Oct 06 05:39:56 2010 +0000
+++ b/tazbb/stuff/web/index.php	Thu Oct 07 02:09:49 2010 +0200
@@ -122,6 +122,13 @@
 ?>
 
+

Genpkglist

+
+
+
+

Cooklist