]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Did some improvements on buildspy.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Dec 2008 20:41:28 +0000 (21:41 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 2 Dec 2008 20:41:28 +0000 (21:41 +0100)
I hope this will run buildspy until the deadly end.

tools/make-buildspy
tools/make-include

index 378b97c2f2c1580b64b325df2162a6d1d2362d5f..a9ccbd9c13de56f2ba8f749d68309734cf7b6813 100755 (executable)
@@ -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
index d80a76d19402fc4ff364cd2d1cdd7d270fb25584..05f02d9266b4485d967bec49e573a9235ee7aca4 100644 (file)
@@ -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