# HG changeset patch # User Paul Issott # Date 1304778121 -3600 # Node ID c49e394e87d356c94b64802082cad5e3d09c14ca # Parent 0ffae104a10cd3d38c08a7f57f9306e61e002213 Tiny edits diff -r 0ffae104a10c -r c49e394e87d3 README --- a/README Sat May 07 16:13:17 2011 +0200 +++ b/README Sat May 07 15:22:01 2011 +0100 @@ -79,12 +79,12 @@ * activity : Activity information for the web interface * blocked : List of manually blocked packages - * broken : Broken packages list when cook fail it is add here + * broken : Broken packages list, when cook fails it is added here * commits : List of packages of the last commit check - * cooklist : Cooklist for unbuild packages or custom command + * cooklist : Cooklist for unbuilt packages or custom commands * cooknotes : All the notes added with 'cooker -n "My note" - * installed* : Lists used to compare installed package before a package - is cooked and after so we can remove them. + * installed* : Lists used to compare installed packages before and after + a package is cooked so we can remove them Toolchain diff -r 0ffae104a10c -r c49e394e87d3 cook --- a/cook Sat May 07 16:13:17 2011 +0200 +++ b/cook Sat May 07 15:22:01 2011 +0100 @@ -30,10 +30,10 @@ list-wok $(gettext "List packages in the wok.") setup $(gettext "Setup your build environment.") test $(gettext "Test environment and cook a package.") - new $(gettext "Create a new package with receipt".) + new $(gettext "Create a new package with a receipt".) list $(gettext "Cook a list of packages.") clean-wok $(gettext "Clean-up all packages files.") - clean-src $(gettext "Clean-up all packages source.") + clean-src $(gettext "Clean-up all packages sources.") pkglist $(gettext "Create all packages.* lists.") $(echo -e "\033[1m$(gettext "Options:")\033[0m") @@ -48,7 +48,7 @@ exit 0 } -# Be sure we root. +# Be sure we're root. check_root() { [ $(id -u) != 0 ] && gettext -e "\nYou must be root to cook.\n\n" && exit 0 } @@ -73,7 +73,7 @@ sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity } -# We dont want those escape in web interface. +# We don't want these escapes in web interface. clean_log() { sed -i -e s'|\[70G\[ \[1;32m| |' \ -e s'|\[0;39m \]||' $LOGS/$pkg.log @@ -84,7 +84,7 @@ echo "$pkg" >> $broken } -# Be sure package exist in wok. +# Be sure package exists in wok. check_pkg_in_wok() { if [ ! -d "$WOK/$pkg" ]; then gettext -e "\nUnable to find package in the wok:" @@ -99,7 +99,7 @@ fi } -# Initialise files used in $CACHE +# Initialize files used in $CACHE init_db_files() { gettext "Creating directories structure in:"; echo " $SLITAZ" mkdir -p $WOK $PKGS $SRC $CACHE $LOGS @@ -110,7 +110,7 @@ done } -# QA: check a receip consistency befor building. +# QA: check a receipt consistency before building. receipt_quality() { gettext -e "QA: checking package receipt...\n" unset online @@ -130,12 +130,12 @@ multimedia office development system-tools security games \ misc meta non-free" if ! echo "$valid" | grep -q -w "$value"; then - gettext "QA: unknow category:"; echo -e " $value\n" + gettext "QA: unknown category:"; echo -e " $value\n" exit 1 fi ;; WEB_SITE) - # We dont check WGET_URL since if dl is needed it will fail. - # Break also if we not online. Here error is not fatal. + # We don't check WGET_URL since if dl is needed it will fail. + # Break also if we're not online. Here error is not fatal. if_empty_value [ -z "$online" ] || break if ! busybox wget -s $value 2>/dev/null; then @@ -150,7 +150,7 @@ unset DEPENDS BUILD_DEPENDS WANTED EXTRAVERSION WGET_URL PROVIDE TARBALL } -# Path's used in receipt and by cook itself. +# Paths used in receipt and by cook itself. set_paths() { pkgdir=$WOK/$PACKAGE src=$pkgdir/source/$PACKAGE-$VERSION @@ -234,7 +234,7 @@ cookdate=$(date "+%Y-%m-%d %H:%M") gettext "Summary for:"; echo " $PACKAGE $VERSION" separator - [ "$prod" ] && echo "Produce : $prod" + [ "$prod" ] && echo "Produced : $prod" cat << EOT Packed : $fs Compressed : $size @@ -245,7 +245,7 @@ EOT } -# Display debugging erroe info. +# Display debugging error info. debug_info() { echo -e "\nDebug information" separator @@ -365,7 +365,7 @@ export DESTDIR MAKEFLAGS CFLAGS CXXFLAGS BUILD_HOST CONFIG_SITE local LC_ALL=POSIX LANG=POSIX - # Check for build dep. + # Check for build deps. cd $INSTALLED && ls -1 > $CACHE/installed.list [ "$DEPENDS" ] && gettext -e "Checking build dependencies...\n" for dep in $BUILD_DEPENDS @@ -373,24 +373,24 @@ if [ ! -f "$INSTALLED/$dep/receipt" ]; then # Try local package first if [ -f "$PKGS/$dep-*.tazpkg" ]; then - gettext "Installing dep (local):"; echo " $dep" + gettext "Installing deps (local):"; echo " $dep" cd $PKGS && tazpkg install $dep-*.tazpkg >/dev/null else - gettext "Installing dep (web/cache):"; echo " $dep" + gettext "Installing deps (web/cache):"; echo " $dep" tazpkg get-install $dep >/dev/null fi fi done ls -1 > $CACHE/installed.cook && cd $CACHE - # If a cook failed deps are not remove since we exit 1. + # If a cook failed deps are not removed since we exit 1. [ ! -s "installed.diff" ] && \ diff installed.list installed.cook > installed.diff deps=$(cat installed.diff | grep ^+[a-zA-Z0-9] | wc -l) # Get source tarball and make sure we have source dir named: - # $PACKAGE-$VERSION to be standard in receipts. Her we use tar.lzma - # tarball if it exist. + # $PACKAGE-$VERSION to be standard in receipts. Here we use tar.lzma + # tarball if it exists. if [ "$WGET_URL" ] && [ ! -f "$SRC/$TARBALL" ]; then if [ -f "$SRC/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma @@ -401,7 +401,7 @@ if [ ! "$WANTED" ] && [ "$TARBALL" ] && [ ! -d "$src" ]; then mkdir -p $pkgdir/source/tmp && cd $pkgdir/source/tmp extract_source || exit 1 - # Some archives are not well done and dont extract to one dir (ex lzma). + # Some archives are not well done and don't extract to one dir (ex lzma). files=$(ls | wc -l) [ "$files" == 1 ] && mv * ../$PACKAGE-$VERSION [ "$files" -gt 1 ] && mkdir -p ../$PACKAGE-$VERSION && \ @@ -438,7 +438,7 @@ } # Create the package. Wanted to use Tazpkg to create a tazpkg package at first, -# but it dont handle EXTRAVERSION. +# but it doesn't handle EXTRAVERSION. packit() { set_paths echo "Pack: $PACKAGE $VERSION" @@ -457,7 +457,7 @@ cp -f ../$file $pack && chown 0.0 $pack/$file && status done - # Create files.list with redirecting find outpout. + # Create files.list with redirecting find output. gettext "Creating the list of files..." && cd $fs find . -type f -print > ../files.list find . -type l -print >> ../files.list @@ -522,7 +522,7 @@ separator && gettext "Package:"; echo -e " $tazpkg\n" } -# Verify package quality and consitensy. +# Verify package quality and consistency. packit_quality() { if fgrep -q ERROR: $LOGS/$pkg.log; then rm -f $command && exit 1 @@ -570,7 +570,7 @@ --wok|-w) [ ! -f "$INSTALLED/mercurial/receipt" ] && \ tazpkg get-install mercurial - [ -d "$WOK" ] && echo -e "A wok already exist.\n" && exit 1 + [ -d "$WOK" ] && echo -e "A wok already exists.\n" && exit 1 hg clone $HG_URL ;; esac @@ -597,7 +597,7 @@ [ -d "${WOK}-hg" ] && WOK=${WOK}-hg echo "" if [ -d "$WOK/$pkg" ]; then - echo -n "$pkg " && gettext "package already exist." + echo -n "$pkg " && gettext "package already exists." echo -e "\n" && exit 1 fi gettext "Creating"; echo -n " $WOK/$pkg" @@ -625,16 +625,16 @@ status && echo "" ;; clean-src) check_root - gettext -e "\nCleaning all packages source..." + gettext -e "\nCleaning all packages sources..." rm -rf $WOK/*/source status && echo "" ;; pkglist) - # Create suitable packages list for TazPKG and only for builded packages. + # Create suitable packages list for TazPKG and only for built packages. [ "$2" ] && PKGS="$2" [ ! -d "$PKGS" ] && \ - gettext -e "\nPackages directory dont exist\n\n" && exit 1 + gettext -e "\nPackages directory doesn't exist\n\n" && exit 1 cd $PKGS - echo "Cook pkglist: Creating all packages list" | log + echo "Cook pkglist: Creating all packages lists" | log gettext -e "\nCreating lists for:"; echo " $PKGS" separator rm -f packages.* files.list* @@ -715,7 +715,7 @@ status && echo "" && exit 0 ;; esac - # Check if wanted is build now so we have separate log files. + # Check if wanted is built now so we have separate log files. if [ "$WANTED" ] && [ ! -d "$WOK/$WANTED/install" ]; then cook "$WANTED" fi @@ -744,7 +744,7 @@ cd $PKGS && tazpkg install \ $PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg --forced else - gettext -e "Unable to install package, build have failed.\n\n" + gettext -e "Unable to install package, build has failed.\n\n" exit 1 fi fi diff -r 0ffae104a10c -r c49e394e87d3 doc/cookutils.en.html --- a/doc/cookutils.en.html Sat May 07 16:13:17 2011 +0200 +++ b/doc/cookutils.en.html Sat May 07 15:22:01 2011 +0100 @@ -323,11 +323,11 @@

Cooker as a Build Bot

- The Cooker is desingned to be a Built Bot for SliTaz, it means it monitor - 2 woks, update the Hg wok, get the differencies and cook all packages that - got a commit. To run The Cooker automatically you must use cron and add a - single to root crontabs in /var/spool/cron/crontabs. Say you would like - to run the Cooker each 2 hours: + The Cooker is designed to be a Built Bot for SliTaz, this means it monitors + 2 woks, updates the Hg wok, gets the differences and cooks all packages that + have been committed. To run The Cooker automatically you must use cron and add a + single line to root crontabs in /var/spool/cron/crontabs. Say you would like + to run the Cooker every 2 hours:

 */2 * * * * /usr/bin/cooker
diff -r 0ffae104a10c -r c49e394e87d3 web/cooker.cgi
--- a/web/cooker.cgi	Sat May 07 16:13:17 2011 +0200
+++ b/web/cooker.cgi	Sat May 07 15:22:01 2011 +0100
@@ -94,7 +94,7 @@
 		fi
 		echo ''
 
-		# Check for a log file and display summary if exist.
+		# Check for a log file and display summary if it exists.
 		if [ -f "$log" ]; then
 			if fgrep -q "Summary " $LOGS/$pkg.log; then
 				if fgrep -q "cook:$pkg$" $command; then