cookutils diff cook @ rev 11
More log and all the same
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 04 23:23:51 2011 +0200 (2011-05-04) |
parents | b543222cb3e0 |
children | fa9a36a8c1f4 |
line diff
1.1 --- a/cook Wed May 04 22:30:30 2011 +0200 1.2 +++ b/cook Wed May 04 23:23:51 2011 +0200 1.3 @@ -10,8 +10,9 @@ 1.4 [ -f "/etc/slitaz/cook.conf" ] && . /etc/slitaz/cook.conf 1.5 [ -f "cook.conf" ] && . ./cook.conf 1.6 1.7 -# Share activity with the Cooker. 1.8 +# Share activity and broken packages with the Cooker. 1.9 activity="$CACHE/activity" 1.10 +broken="$CACHE/broken" 1.11 1.12 # 1.13 # Functions 1.14 @@ -294,7 +295,7 @@ 1.15 1.16 # The main cook function. 1.17 cookit() { 1.18 - echo "Cooking: $PACKAGE $VERSION" 1.19 + echo "Cook: $PACKAGE $VERSION" 1.20 separator 1.21 set_paths 1.22 [ "$QA" ] && receipt_quality 1.23 @@ -369,9 +370,11 @@ 1.24 fi 1.25 if grep -q ^genpkg_rules $pkgdir/receipt; then 1.26 gettext -e "Executing: genpkg_rules\n" 1.27 + cd $pkgdir 1.28 mkdir -p $fs && genpkg_rules || ( echo -e \ 1.29 "\nERROR: genpkg_rules failed\n" | \ 1.30 tee -a $LOGS/$pkg.log && exit 1 ) 1.31 + gettext -e "Now will pack the package.\n" 1.32 fi 1.33 separator && echo "" 1.34 } 1.35 @@ -415,6 +418,7 @@ 1.36 echo -e "ERROR: empty package\n" | tee -a $LOGS/$pkg.log && exit 1 1.37 else 1.38 mv -f $WOK/$pkg/taz/$pkg-*.tazpkg $PKGS 1.39 + sed -i /^${pkg}$/d $broken 1.40 fi 1.41 } 1.42 1.43 @@ -435,6 +439,7 @@ 1.44 setup) 1.45 # Setup a build environment 1.46 check_root 1.47 + echo "Cook: setting up the environment" | log 1.48 gettext -e "\nSetting up your environment\n" 1.49 separator && cd $SLITAZ 1.50 gettext "Creating directories structure in:"; echo " $SLITAZ" 1.51 @@ -467,7 +472,7 @@ 1.52 gettext -e "All done, ready to cook packages :-)\n\n" ;; 1.53 test) 1.54 # Test a cook environment. 1.55 - echo "TODO: Use $DATA/cooktest \$(cp cooktest \$WOK and cook)" 1.56 + echo "cook test: testing the cook environment" | log 1.57 [ ! -d "$WOK" ] && exit 1 1.58 [ ! -d "$WOK/cooktest" ] && cp -r $DATA/cooktest $WOK 1.59 cook cooktest ;; 1.60 @@ -493,6 +498,7 @@ 1.61 [ -z "$2" ] && gettext -e "\nNo list in argument.\n\n" && exit 1 1.62 [ ! -f "$2" ] && gettext -e "\nNo list found:" && \ 1.63 echo -e " $2\n" && exit 1 1.64 + echo "cook list: Starting to cook: $2" | log 1.65 for pkg in $(cat $2) 1.66 do 1.67 cook $pkg || broken 1.68 @@ -513,6 +519,7 @@ 1.69 [ ! -d "$PKGS" ] && \ 1.70 gettext -e "\nPackages directory dont exist\n\n" && exit 1 1.71 cd $PKGS 1.72 + echo "cook pkglist: Creating packages list" | log 1.73 gettext -e "\nCreating lists for:"; echo " $PKGS" 1.74 separator 1.75 rm -f packages.* files.list*