# HG changeset patch # User Christophe Lincoln # Date 1304647631 -7200 # Node ID 93bb4bfc8c265cc19ca5048e6a1699f655761c97 # Parent 0eb341935f31dcb9ffecf2e4a1b4bc51b0559291 cooker: add option --list= and log all stderr diff -r 0eb341935f31 -r 93bb4bfc8c26 cook --- a/cook Fri May 06 03:29:03 2011 +0200 +++ b/cook Fri May 06 04:07:11 2011 +0200 @@ -654,11 +654,11 @@ fi # Cook and pack or exit on error and log everything. - cookit | tee $LOGS/$pkg.log + cookit 2>&1 | tee $LOGS/$pkg.log remove_deps | tee -a $LOGS/$pkg.log cookit_quality - packit | tee -a $LOGS/$pkg.log + packit 2>&1 | tee -a $LOGS/$pkg.log clean_log packit_quality diff -r 0eb341935f31 -r 93bb4bfc8c26 cooker --- a/cooker Fri May 06 03:29:03 2011 +0200 +++ b/cooker Fri May 06 04:07:11 2011 +0200 @@ -38,8 +38,9 @@ --notes Display all the cooknotes. --note= Add a note to the cooknotes. --pkg= Same as 'cook pkg' but with cooker log. + --flavor= Cook all packages of a flavor. + --list= Cook all package in the given list. --cat= Cook all packages of a category. - --flavor= Cook all packages of a flavor. --all Find and cook all unbuilt packages. EOT @@ -258,8 +259,7 @@ # Same as 'cook pkg' but with log for web interface. pkg=${1#--pkg=} echo "Cook started for: $pkg" | log - cook $pkg || broken - emty_command ;; + cook $pkg || broken ;; --cat=*) # Cook all packages of a category. cat=${1#--cat=} @@ -271,17 +271,26 @@ done strip_blocked cook_order | tee $LOGS/cookorder.log - cook_list - emty_command ;; + cook_list ;; --flavor=*) # Cook all packages of a flavor. flavor=${1#--flavor=} + [ ! -d "$SLITAZ/flavors/$flavor" ] && \ + echo -e "\nSpecified flavor does not exist: $flavor\n" && exit 1 list=$SLITAZ/flavors/$flavor/packages.list cp -a $list $cooklist strip_blocked cook_order | tee $LOGS/cookorder.log - cook_list - emty_command ;; + cook_list ;; + --list=*) + # Cook a list og package given in argument. + list=${1#--list=} + [ ! -f "$list" ] && \ + echo -e "\nSpecified list does not exist: $list\n" && exit 1 + cp -a $list $cooklist + strip_blocked + cook_order | tee $LOGS/cookorder.log + cook_list ;; --all) # Try to build all unbuilt packages except blocked's. echo "cooker:--all" > $command diff -r 0eb341935f31 -r 93bb4bfc8c26 doc/cookutils.en.html --- a/doc/cookutils.en.html Fri May 06 03:29:03 2011 +0200 +++ b/doc/cookutils.en.html Fri May 06 04:07:11 2011 +0200 @@ -173,11 +173,14 @@

To cook more than one package at once you have different kind of choices. - The currently implemeted ways (more will come such as --list=): + You use an existing package such as used for Live flavors, you can also + use a custom list with packages name line by line. Finaly you can build + all packages of a category.

+# cooker --flavor=flavor
+# cooker --list=/path/to/list
 # cooker --cat=category
-# cooker --flavor=flavo
 

Cooker CGI/Web