cookutils diff cooker @ rev 51

cook: fix blocked
author Christophe Lincoln <pankso@slitaz.org>
date Sat May 07 05:41:58 2011 +0200 (2011-05-07)
parents 8df3646e9d8f
children 7cfa8aa2860a
line diff
     1.1 --- a/cooker	Sat May 07 04:42:06 2011 +0200
     1.2 +++ b/cooker	Sat May 07 05:41:58 2011 +0200
     1.3 @@ -10,7 +10,8 @@
     1.4  [ -f "/etc/slitaz/cook.conf" ] && . /etc/slitaz/cook.conf
     1.5  [ -f "cook.conf" ] && . ./cook.conf
     1.6  
     1.7 -# The same wok as cook.
     1.8 +# Set pkg name and use same wok as cook.
     1.9 +pkg="$2"
    1.10  wok="$WOK"
    1.11  flavors="$SLITAZ/flavors"
    1.12  
    1.13 @@ -34,15 +35,17 @@
    1.14  Usage: cooker [command] [pkg|list|note]
    1.15  
    1.16  Options:
    1.17 -  usage|-u      Display this short usage.
    1.18 -  setup|-s      Setup the Cooker environment.
    1.19 -  note|-n       Add a note to the cooknotes.
    1.20 -  notes|-ns     Display all the cooknotes.
    1.21 -  pkg|-p        Same as 'cook pkg' but with cooker log.
    1.22 -  flavor|-f     Cook all packages of a flavor.
    1.23 -  list|-l       Cook all package in the given list.
    1.24 -  cat|-c        Cook all packages of a category.
    1.25 -  all|-a        Find and cook all unbuilt packages.
    1.26 +  usage|-u        Display this short usage.
    1.27 +  setup|-s        Setup the Cooker environment.
    1.28 +  note|-n         Add a note to the cooknotes.
    1.29 +  notes|-ns       Display all the cooknotes.
    1.30 +  block|-b        Block a package so cook will skip it.
    1.31 +  unblock|-ub     Unblock a blocked package.
    1.32 +  pkg|-p          Same as 'cook pkg' but with cooker log.
    1.33 +  flavor|-f       Cook all packages of a flavor.
    1.34 +  list|-l         Cook all package in the given list.
    1.35 +  cat|-c          Cook all packages of a category.
    1.36 +  all|-a          Find and cook all unbuilt packages.
    1.37  
    1.38  EOT
    1.39  	exit 0
    1.40 @@ -257,13 +260,18 @@
    1.41  		separator
    1.42  		cat $cooknotes
    1.43  		separator && echo "" ;;
    1.44 +	block|-b)
    1.45 +		# Block a package.
    1.46 +		[ "$pkg" ] && cook $pkg --block ;;
    1.47 +	unblock|-ub)
    1.48 +		# Unblock a package.
    1.49 +		[ "$pkg" ] && cook $pkg --unblock ;;
    1.50  	reverse|-r)
    1.51  		# Cook all reverse dependencies for a packages. This command let us
    1.52  		# control the Cooker manually for commit that will cook a lot of packages.
    1.53  		#
    1.54  		# Use hg commit ? Ex: hg commit -m "Message bla bla | cooker:reverse"
    1.55  		#
    1.56 -		pkg="$2"
    1.57  		[ ! -d "$wok/$pkg" ] && echo -e "\nNo package $2 found.\n" && exit 0
    1.58  		rm -f $cooklist && touch $cooklist && cd $wok
    1.59  		echo -e "\nReverse cooklist for: $pkg"
    1.60 @@ -281,7 +289,6 @@
    1.61  		cook_list ;;
    1.62  	pkg|-p)
    1.63  		# Same as 'cook pkg' but with log for web interface.
    1.64 -		pkg="$2"
    1.65  		echo "Cook started for: <a href='cooker.cgi?pkg=$pkg'>$pkg</a>" | log
    1.66  		cook $pkg || broken
    1.67  		empty_command ;;