wok-4.x rev 4110

tazbb: add 'cook' command and update
author Christophe Lincoln <pankso@slitaz.org>
date Sat Sep 19 22:16:35 2009 +0200 (2009-09-19)
parents 3763840ba49c
children 191da58082eb c798beab7a71
files tazbb/receipt tazbb/stuff/tazbb
line diff
     1.1 --- a/tazbb/receipt	Sat Sep 19 21:04:29 2009 +0200
     1.2 +++ b/tazbb/receipt	Sat Sep 19 22:16:35 2009 +0200
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="tazbb"
     1.7 -VERSION="1.1"
     1.8 +VERSION="1.2"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="SliTaz Build Bot."
    1.11  MAINTAINER="pankso@slitaz.org"
     2.1 --- a/tazbb/stuff/tazbb	Sat Sep 19 21:04:29 2009 +0200
     2.2 +++ b/tazbb/stuff/tazbb	Sat Sep 19 22:16:35 2009 +0200
     2.3 @@ -44,6 +44,7 @@
     2.4    usage        Print this short usage and command list.
     2.5    list-pkgs    List last cooked packages with date.
     2.6    report       Run in report mode and dont cook anything [--verbose].
     2.7 +  cook         Cook, install and log a single package build.
     2.8    cook-all     Cook all missing, modified or unbuilt packages.
     2.9    cook-commit  Cook all packages affected by a commit in the last update.
    2.10    test-pkgs    Execute a test suite on all packages [--verbose].
    2.11 @@ -419,6 +420,27 @@
    2.12  		check_wok $@
    2.13  		test_packages $@
    2.14  		show_report ;;
    2.15 +	cook)
    2.16 +		# Cook, install and log a single package build.
    2.17 +		if [ -z $2 ]; then
    2.18 +			echo "Please specify a package on the command line."
    2.19 +			rm -f $LOCK_FILE && exit 0
    2.20 +		fi
    2.21 +		pkg=$2
    2.22 +		echo "Starting to cook and install: $pkg"
    2.23 +		echo "(cooking <a href=\"log.php?package=$pkg\">$pkg</a>)" > $DB_DIR/running
    2.24 +		tazwok clean $pkg
    2.25 +		script -c "echo 'install' | tazwok cook $pkg" $LOG_DIR/$pkg.log
    2.26 +		if [ -f $BUILD_WOK/$pkg/taz/*/receipt ]; then
    2.27 +			. $BUILD_WOK/$pkg/taz/*/receipt
    2.28 +			echo "(installing $PACKAGE-${VERSION}$EXTRAVERSION.tazpkg)" \
    2.29 +				> $DB_DIR/running
    2.30 +			yes | tazpkg install \
    2.31 +				$PACKAGES_REPOSITORY/$PACKAGE-${VERSION}$EXTRAVERSION.tazpkg \
    2.32 +				--forced
    2.33 +		else
    2.34 +			echo "Unable to install: $pkg"
    2.35 +		fi ;;
    2.36  	cook-all)
    2.37  		# Update wok, gen report (with cooklist), cook all packages, test,
    2.38  		# clean, gen new report and lists.