From: Michael Tremer Date: Tue, 2 Dec 2008 20:41:28 +0000 (+0100) Subject: Did some improvements on buildspy. X-Git-Tag: v3.0-alpha1~419^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d98b06ca7bb57c6509c5d4b165e302fb11a4e07;p=ipfire-3.x.git Did some improvements on buildspy. I hope this will run buildspy until the deadly end. --- diff --git a/tools/make-buildspy b/tools/make-buildspy index 378b97c2f..a9ccbd9c1 100755 --- a/tools/make-buildspy +++ b/tools/make-buildspy @@ -38,18 +38,22 @@ build_spy_send_profile() { } if [ "$(basename $0)" == "make-buildspy" ]; then - sleep 10 while true; do + sleep 10 DATA=$(cat $BUILD_SPY_FILENAME 2>/dev/null || true) > $BUILD_SPY_FILENAME [ -n "$DATA" ] && \ - wget -q -O /dev/null --user-agent="${NAME}BuildSpy/${VERSION}" \ + wget -q -O - --user-agent="${NAME}BuildSpy/${VERSION}" \ --post-data="action=set&uuid=${UUID}${DATA}" \ - http://build.ipfire.org/rpc.py & + http://build.ipfire.org/rpc.py >> $LOGFILE 2>&1 & + # If $BUILD_SPY_FILENAME file has content we need a new loop. + # If not, check if we are still running. + if [ -s $BUILD_SPY_FILENAME ]; then + continue + fi [ -e $BASEDIR/.running ] || break - sleep 10 done rm -f $BUILD_SPY_FILENAME fi diff --git a/tools/make-include b/tools/make-include index d80a76d19..05f02d926 100644 --- a/tools/make-include +++ b/tools/make-include @@ -492,7 +492,9 @@ build() { build_spy_send_profile build_spy state compiling - BASEDIR=$BASEDIR UUID=$UUID NAME=$NAME VERSION=$VERSION $BASEDIR/tools/make-buildspy & + BASEDIR=$BASEDIR UUID=$UUID NAME=$NAME VERSION=$VERSION \ + LOGFILE="$BASEDIR/log_${TARGET}/_build.00-buildspy.log" \ + $BASEDIR/tools/make-buildspy & if [ -f $BASEDIR/log_${TARGET}/02_base/stage2-LFS ]; then prepareenv