webbuild-cgi: fix for distroquery usage while searching for already existing package
This commit is contained in:
parent
8623f8bfd8
commit
a044057f9f
@ -1039,14 +1039,11 @@ if [ "$REQUEST" = "prepare" -o "$REQUEST" = "updatespec" -o "$REQUEST" = "speccr
|
||||
RET=$?
|
||||
;;
|
||||
"speccreate") if [ "$SPECCREATEURL" -a "$PACKAGE" ]; then
|
||||
FOUND_EXISTING=`curl -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_milestone2=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true" | \
|
||||
sed "s|.*\([0-9][0-9]*\) result.*|\1|"`
|
||||
if [ "$FOUND_EXISTING" != "0" -a "$FOUND_EXISTING" != "" ]; then
|
||||
FOUND_EXISTING=`curl -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_milestone2=true&search_milestone3=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true&searchbox=false"`
|
||||
if [ "$FOUND_EXISTING" != "" ]; then
|
||||
echo -n "<div align=left class=output id=outputtop style=\"font-family:serif;color:black;background-color:#E0F2D0;\">"
|
||||
echo "<b><font color=red>ERROR: package already exists, please update from appropriate version:</font><b>"
|
||||
echo -n "<hr><b>Search results for \"$PACKAGE\":</b>"
|
||||
curl -s "${WEBBUILD_DISTROQUERY_URL}?package=$PACKAGE&search_milestone2=true&search_devel=true&search_sources=true&query_compact=true&replyplain=true" | \
|
||||
sed "s| \(href=.\)/| \1${SITE_BASE_URL}/|g"
|
||||
echo -n "<hr><b>Search results for \"$PACKAGE\":</b>$FOUND_EXISTING"
|
||||
echo -n "</div>"
|
||||
RET=1
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user