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