From a044057f9f1503588b983a882116b7b5a14b5e4a Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 24 Nov 2014 12:48:02 +0100 Subject: [PATCH] webbuild-cgi: fix for distroquery usage while searching for already existing package --- webbuild/webbuild-cgi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webbuild/webbuild-cgi b/webbuild/webbuild-cgi index 7f61e9a..013c4b0 100755 --- a/webbuild/webbuild-cgi +++ b/webbuild/webbuild-cgi @@ -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 "
" echo "ERROR: package already exists, please update from appropriate version:" - echo -n "
Search results for \"$PACKAGE\":" - 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 "
Search results for \"$PACKAGE\":$FOUND_EXISTING" echo -n "
" RET=1 continue