Commit 144606ca authored by Vitaly Lipatov's avatar Vitaly Lipatov

set build ok flag only if all build is done

parent 9924cdab
......@@ -100,17 +100,18 @@ for i in $LISTNAMES
do
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo "Build in hasher ($MENV) in $HASHERDIR dir" >$LOGFILE
rm -f $LOGFILE.failed
rm -f $LOGFILE.ok
echog "Build in hasher: $i (arg: $HASHERARG --build-args \"$BUILDARGS\", distro: $MENV, hasherdir: $HASHERDIR)"
# Note: hasher is already use renice for low priority
showcmd $HSH $HASHERARG --build-args "$BUILDARGS" -- $HASHERDIR $i
($HSH $HASHERARG --build-args "$BUILDARGS" -- $HASHERDIR $i 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE | colorify
($HSH $HASHERARG --build-args "$BUILDARGS" -- $HASHERDIR $i 2>&1 && touch $LOGFILE.ok) | tee -a $LOGFILE | colorify
test -L $HASHERDIR/BUILD || ln -s chroot/usr/src/RPM/BUILD $HASHERDIR/
if [ -f $LOGFILE.failed ] ; then
if [ ! -f $LOGFILE.ok ] ; then
RESULT=1
break
fi
rm -f $LOGFILE.ok
check_log $LOGFILE ; RESULT=$?
test $RESULT = 1 && break
echog "########## Build of `basename $i` is done in hasher $MENV #############"
......
......@@ -117,10 +117,13 @@ do
fi
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
echo "Build in native system" >$LOGFILE
rm -f $LOGFILE.failed
(uni_rpmbuild --commit $i -bb $LISTRPMARGS $NODEPS --target $BUILDARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE | colorify
rm -f $LOGFILE.ok
(uni_rpmbuild --commit $i -bb $LISTRPMARGS $NODEPS --target $BUILDARCH 2>&1 && touch $LOGFILE.ok) | tee -a $LOGFILE | colorify
[ -r "$LOGFILE.ok" ]
RET=$?
rm -f $LOGFILE.ok
[ -r "$LOGFILE.failed" ] && RET=1 || RET=0
if [ "$RET" = "0" ] ; then
check_log $LOGFILE
RET=$?
......
......@@ -87,14 +87,15 @@ get_list()
#curl -l $URL/ >$LIST
touch $LIST
# suitable for ftp and http lists
rm -f $LIST.failed
( $CURL -s -l $URL/ || touch $LIST.failed ) | tee $LIST.tmp | html_filter >$LIST
if [ -e $LIST.failed ] ; then
rm -f $LIST.ok
( $CURL -s -l $URL/ && touch $LIST.ok ) | tee $LIST.tmp | html_filter >$LIST
if [ ! -e $LIST.ok ] ; then
#echo -e -n "\r"
warning "Could't download list for $SYS from $URL"
#rm -f "$LIST.tmp"
return
fi
rm -f $LIST.ok
# check if there is letter subdirs (Fedora)
for i in $(cat $LIST.tmp | sed -e "s|<a href=\"||g" -e "s|/\">.*||g") ; do
rhas "$i" rpm && break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment