tazwok diff tazwok @ rev 352

Some changes to Pascal's improvement, handle all logs created (including iso/check-incoming/cook-toolchain); fix an error about cookorder.txt
author Antoine Bodin <gokhlayeh@slitaz.org>
date Wed Feb 23 22:44:05 2011 +0100 (2011-02-23)
parents 976c9e9df5fb
children 083e9c4c49c3 dc1b670ed59c
line diff
     1.1 --- a/tazwok	Wed Feb 23 12:23:02 2011 +0100
     1.2 +++ b/tazwok	Wed Feb 23 22:44:05 2011 +0100
     1.3 @@ -137,9 +137,14 @@
     1.4  		touch $SOURCES_REPOSITORY/sources.list
     1.5  	fi
     1.6  
     1.7 -	
     1.8  	# Limit memory usage.
     1.9  	ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
    1.10 +
    1.11 +	# log steps for webserver.
    1.12 +	log_step="$LOCAL_REPOSITORY/log/step"
    1.13 +	run_on_exit="$run_on_exit
    1.14 +rm -f $LOCAL_REPOSITORY/log/step
    1.15 +rm -f $LOCAL_REPOSITORY/log/package"
    1.16  }
    1.17  
    1.18  # Used in several functions.
    1.19 @@ -1182,7 +1187,8 @@
    1.20  					sed "/^$PACKAGE$/d" -i $PACKAGES_REPOSITORY/$i
    1.21  				done	
    1.22  				rm -f $LOCAL_REPOSITORY/log/$PACKAGE.html	
    1.23 -				if [ "$pkg_repository" = "$INCOMING_REPOSITORY" ]; then
    1.24 +				if [ "$pkg_repository" = "$INCOMING_REPOSITORY" ] && \
    1.25 +				[ "$(sed 1!d $PACKAGES_REPOSITORY/cookorder.txt)" != "#PlanSort" ] ; then
    1.26  					sed 1i"#PlanSort" -i $PACKAGES_REPOSITORY/cookorder.txt
    1.27  					regen_cooklist=yes
    1.28  				else
    1.29 @@ -1686,7 +1692,8 @@
    1.30  	if [ "$check_db_status" ]; then
    1.31  		[ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb
    1.32  		[ "$plan_sort_wandb" ] && sort -o $wan_db $wan_db && unset plan_sort_wandb
    1.33 -		if [ "$plan_regen_cookorder" ]; then
    1.34 +		if [ "$plan_regen_cookorder" ] && \
    1.35 +		[ "$(sed 1!d $PACKAGES_REPOSITORY/cookorder.txt)" != "#PlanSort" ]; then
    1.36  			grep -q "^#" $PACKAGES_REPOSITORY/cookorder.txt || \
    1.37  			sed 1i"#PlanSort" -i $PACKAGES_REPOSITORY/cookorder.txt
    1.38  		fi
    1.39 @@ -2582,7 +2589,7 @@
    1.40  		[ "$plan_sort_depdb" ] && sort -o $dep_db $dep_db && unset plan_sort_depdb
    1.41  		[ "$plan_sort_wandb" ] && sort -o $wan_db $wan_db && unset plan_sort_wandb
    1.42  		if [ "$plan_regen_cookorder" ]; then
    1.43 -			grep -q "^#" $PACKAGES_REPOSITORY/cookorder.txt || \
    1.44 +			[ "$(sed 1!d $PACKAGES_REPOSITORY/cookorder.txt)" = "#PlanSort" ] || \
    1.45  			sed 1i"#PlanSort" -i $PACKAGES_REPOSITORY/cookorder.txt
    1.46  		fi
    1.47  		cook
    1.48 @@ -3116,6 +3123,7 @@
    1.49  		report open-bloc
    1.50  		[ -f $LOCAL_REPOSITORY/log/incoming.html ] && rm $LOCAL_REPOSITORY/log/incoming.html	
    1.51  		report sublog $LOCAL_REPOSITORY/log/incoming.html
    1.52 +		echo "incoming" > $LOCAL_REPOSITORY/log/package	
    1.53  		check_for_incoming
    1.54  		report end-sublog
    1.55  		report close-bloc