Merge "failmoved logs polluted by non-errors"

This commit is contained in:
Zuul 2018-11-27 16:09:56 +00:00 committed by Gerrit Code Review
commit c6d31e1acd
2 changed files with 13 additions and 4 deletions

View File

@ -242,7 +242,6 @@ download () {
fi
else
echo "Already have $dest_dir/$rpm_name"
echo "already_there_srpm:$rpm_name" >> $LOG
fi
echo
done

View File

@ -65,7 +65,14 @@ get_url() {
fi
else
_url_cmd="$(get_yum_command $_name $_level)"
_ret="$($_url_cmd --url)"
# When we add --url to the yum download command,
# --archlist is no longer enforced. Multiple
# url's might be returned. So use grep to
# filter urls for the desitered arch.
local arr=( $(split_filename $_name) )
local arch=${arr[3]}
_ret="$($_url_cmd --url | grep "[.]$arch[.]rpm$")"
fi
echo "$_ret"
}
@ -139,14 +146,17 @@ process_result() {
mkdir -p $dest_dir
fi
echo "url_srpm:$url" >> $LOG
echo "url_srpm:$url"
if ! mv -f $sfile* $dest_dir ; then
echo "FAILED to move $rpm_name"
echo "fail_move_srpm:$rpm_name" >> $LOG
return 1
fi
echo "found_srpm:$rpm_name" >> $LOG
echo "found_srpm:$rpm_name"
echo $rpm_name >> $FOUND_SRPMS
return 0
}