cookutils rev 26

cooker: add option --list= and log all stderr
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 06 04:07:11 2011 +0200 (2011-05-06)
parents 0eb341935f31
children 107f17f16133
files cook cooker doc/cookutils.en.html
line diff
     1.1 --- a/cook	Fri May 06 03:29:03 2011 +0200
     1.2 +++ b/cook	Fri May 06 04:07:11 2011 +0200
     1.3 @@ -654,11 +654,11 @@
     1.4  		fi
     1.5  
     1.6  		# Cook and pack or exit on error and log everything.
     1.7 -		cookit | tee $LOGS/$pkg.log
     1.8 +		cookit 2>&1 | tee $LOGS/$pkg.log
     1.9  		remove_deps | tee -a $LOGS/$pkg.log
    1.10  		cookit_quality
    1.11  		
    1.12 -		packit | tee -a $LOGS/$pkg.log
    1.13 +		packit 2>&1 | tee -a $LOGS/$pkg.log
    1.14  		clean_log
    1.15  		packit_quality
    1.16  		
     2.1 --- a/cooker	Fri May 06 03:29:03 2011 +0200
     2.2 +++ b/cooker	Fri May 06 04:07:11 2011 +0200
     2.3 @@ -38,8 +38,9 @@
     2.4    --notes        Display all the cooknotes.
     2.5    --note=        Add a note to the cooknotes.
     2.6    --pkg=         Same as 'cook pkg' but with cooker log.
     2.7 +  --flavor=      Cook all packages of a flavor.
     2.8 +  --list=        Cook all package in the given list.
     2.9    --cat=         Cook all packages of a category.
    2.10 -  --flavor=      Cook all packages of a flavor.
    2.11    --all          Find and cook all unbuilt packages.
    2.12  
    2.13  EOT
    2.14 @@ -258,8 +259,7 @@
    2.15  		# Same as 'cook pkg' but with log for web interface.
    2.16  		pkg=${1#--pkg=}
    2.17  		echo "Cook started for: <a href='cooker.cgi?pkg=$pkg'>$pkg</a>" | log
    2.18 -		cook $pkg || broken
    2.19 -		emty_command ;;
    2.20 +		cook $pkg || broken ;;
    2.21  	--cat=*)
    2.22  		# Cook all packages of a category.
    2.23  		cat=${1#--cat=}
    2.24 @@ -271,17 +271,26 @@
    2.25  		done
    2.26  		strip_blocked
    2.27  		cook_order | tee $LOGS/cookorder.log
    2.28 -		cook_list
    2.29 -		emty_command ;;
    2.30 +		cook_list ;;
    2.31  	--flavor=*)
    2.32  		# Cook all packages of a flavor.
    2.33  		flavor=${1#--flavor=}
    2.34 +		[ ! -d "$SLITAZ/flavors/$flavor" ] && \
    2.35 +			echo -e "\nSpecified flavor does not exist: $flavor\n" && exit 1
    2.36  		list=$SLITAZ/flavors/$flavor/packages.list
    2.37  		cp -a $list $cooklist
    2.38  		strip_blocked
    2.39  		cook_order | tee $LOGS/cookorder.log
    2.40 -		cook_list
    2.41 -		emty_command ;;
    2.42 +		cook_list ;;
    2.43 +	--list=*)
    2.44 +		# Cook a list og package given in argument.
    2.45 +		list=${1#--list=}
    2.46 +		[ ! -f "$list" ] && \
    2.47 +			echo -e "\nSpecified list does not exist: $list\n" && exit 1
    2.48 +		cp -a $list $cooklist
    2.49 +		strip_blocked
    2.50 +		cook_order | tee $LOGS/cookorder.log
    2.51 +		cook_list ;;
    2.52  	--all)
    2.53  		# Try to build all unbuilt packages except blocked's.
    2.54  		echo "cooker:--all" > $command
     3.1 --- a/doc/cookutils.en.html	Fri May 06 03:29:03 2011 +0200
     3.2 +++ b/doc/cookutils.en.html	Fri May 06 04:07:11 2011 +0200
     3.3 @@ -173,11 +173,14 @@
     3.4  </pre>
     3.5  <p>
     3.6  	To cook more than one package at once you have different kind of choices.
     3.7 -	The currently implemeted ways (more will come such as --list=):
     3.8 +	You use an existing package such as used for Live flavors, you can also
     3.9 +	use a custom list with packages name line by line. Finaly you can build
    3.10 +	all packages of a category.
    3.11  </p>
    3.12  <pre>
    3.13 +# cooker --flavor=flavor
    3.14 +# cooker --list=/path/to/list
    3.15  # cooker --cat=category
    3.16 -# cooker --flavor=flavo
    3.17  </pre>
    3.18  
    3.19  <h3>Cooker CGI/Web</h3>