cookutils rev 21

cooker: add --flavor=name to build all packages of a flavor
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 05 22:36:03 2011 +0200 (2011-05-05)
parents c7af43cc8a07
children 90ec7271d772
files cooker
line diff
     1.1 --- a/cooker	Thu May 05 22:27:09 2011 +0200
     1.2 +++ b/cooker	Thu May 05 22:36:03 2011 +0200
     1.3 @@ -35,7 +35,8 @@
     1.4    --usage        Display this short usage.
     1.5    --setup        Setup the Cooker environment.
     1.6    --pkg=         Same as 'cook pkg' but with cooker log.
     1.7 -  --cat=         Cook all package of a category.
     1.8 +  --cat=         Cook all packages of a category.
     1.9 +  --flavor=      Cook all packages of a flavor.
    1.10    --all          Find and cook all unbuilt packages.
    1.11  
    1.12  EOT
    1.13 @@ -188,7 +189,6 @@
    1.14  	do
    1.15  		if [ ! -d "$wok/$pkg/install" ]; then
    1.16  			echo "Cook started for: <a href='cooker.cgi?pkg=$pkg'>$pkg</a>" | log
    1.17 -			
    1.18  			cook $pkg || broken
    1.19  			sed -i /^${pkg}$/d $cooklist
    1.20  		fi
    1.21 @@ -230,7 +230,7 @@
    1.22  		# Cook all reverse dependencies for a packages. This command let us
    1.23  		# control the Cooker manually for commit that will cook a lot of packages.
    1.24  		#
    1.25 -		# Use hg commit ? Ex: hg commit -m "Message bla bla | cooker:--reverse"
    1.26 +		# Use hg commit ? Ex: hg commit -m "Message bla bla | cooker:reverse"
    1.27  		#
    1.28  		pkg=${1#--reverse=}
    1.29  		[ ! -d "$wok/$pkg" ] && echo "No package $2 found." && exit 0
    1.30 @@ -260,6 +260,15 @@
    1.31  		cook_order | tee $LOGS/cookorder.log
    1.32  		cook_list
    1.33  		emty_command ;;
    1.34 +	--flavor=*)
    1.35 +		# Cook all packages of a flavor.
    1.36 +		flavor=${1#--flavor=}
    1.37 +		list=$SLITAZ/flavors/$flavor/packages.list
    1.38 +		cp -a $list $cooklist
    1.39 +		strip_blocked
    1.40 +		cook_order | tee $LOGS/cookorder.log
    1.41 +		cook_list
    1.42 +		emty_command ;;
    1.43  	--all)
    1.44  		# Try to build all unbuilt packages except blocked's.
    1.45  		echo "cooker:--all" > $command