David Caro has uploaded a new change for review.

Change subject: Changing from wget to curl
......................................................................

Changing from wget to curl

We are having segmentation faults with wget, hoping curl does not have
them. This is an temporary solution until the hooks are migrated to
python code.

Change-Id: I0cf356141f58b394070a540ff4e90bd383f0e9e3
Signed-off-by: David Caro <dcaro...@redhat.com>
---
M hooks/lib/bz.sh
1 file changed, 26 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/gerrit-admin refs/changes/89/24489/1

diff --git a/hooks/lib/bz.sh b/hooks/lib/bz.sh
index d3e5811..5acfc5d 100644
--- a/hooks/lib/bz.sh
+++ b/hooks/lib/bz.sh
@@ -37,9 +37,13 @@
         local cookie_jar="$(conf.t_get bz_cookie_jar)"
         [[ -f ${cookie_jar?You have to login to bugzilla first, see bz.login} 
]]
         bug_cache="/tmp/bz_cache.$PPID.${bug_id}.${btype}"
-        wget -qO - \
-            --load-cookies "$cookie_jar" \
-            --save-cookies "$cookie_jar" \
+#        wget -qO - \
+#            --load-cookies "$cookie_jar" \
+#            --save-cookies "$cookie_jar" \
+#            "https://bugzilla.redhat.com/show_bug.cgi?id=${bug_id}${options}"; 
\
+        curl \
+            --silent \
+            --cookie-jar "$cookie_jar" \
             "https://bugzilla.redhat.com/show_bug.cgi?id=${bug_id}${options}"; \
         | tee "$bug_cache"
         conf.t_put "bz_${bug_id}_${btype}" "$bug_cache"
@@ -69,11 +73,17 @@
     do
         post_data="${post_data:+$post_data&}$param"
     done
-    wget -qO - \
-        --load-cookies "$cookie_jar" \
-        --save-cookies "$cookie_jar" \
+#    wget -qO - \
+#        --load-cookies "$cookie_jar" \
+#        --save-cookies "$cookie_jar" \
+#        --header "Referer: 
https://bugzilla.redhat.com/show_bug.cgi?id=$bug_id"; \
+#        --post-data "$post_data" \
+#        "https://bugzilla.redhat.com/process_bug.cgi?id=$bug_id"; \
+    curl \
+        --silent \
+        --cookie-jar "$cookie_jar" \
         --header "Referer: 
https://bugzilla.redhat.com/show_bug.cgi?id=$bug_id"; \
-        --post-data "$post_data" \
+        --data "$post_data" \
         "https://bugzilla.redhat.com/process_bug.cgi?id=$bug_id"; \
     | tee /tmp/update_bug_log.${bug_id} 2>/dev/null\
     | grep -q "Changes submitted for"
@@ -187,9 +197,15 @@
         [[ "$cookie_jar" == "" ]] \
         && cookie_jar="/tmp/bz_cache.$PPID.cookies"
         conf.t_put "bz_cookie_jar" "$cookie_jar"
-        wget -qO ${plain_bug:-/dev/null} --save-cookies "$cookie_jar" \
-            --post-data 
"Bugzilla_login=${bz_user//@/%40}&Bugzilla_password=${bz_password}&GoAheadAndLogIn=Log+in"
 \
-            "$server_url"
+#        wget -qO ${plain_bug:-/dev/null} --save-cookies "$cookie_jar" \
+#            --post-data 
"Bugzilla_login=${bz_user//@/%40}&Bugzilla_password=${bz_password}&GoAheadAndLogIn=Log+in"
 \
+#            "$server_url"
+        curl \
+            --silent \
+            --cookie-jar "$cookie_jar" \
+            --data 
"Bugzilla_login=${bz_user//@/%40}&Bugzilla_password=${bz_password}&GoAheadAndLogIn=Log+in"
 \
+            "$server_url" \
+        > ${plain_bug:-/dev/null}
     fi
 }
 


-- 
To view, visit http://gerrit.ovirt.org/24489
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cf356141f58b394070a540ff4e90bd383f0e9e3
Gerrit-PatchSet: 1
Gerrit-Project: gerrit-admin
Gerrit-Branch: master
Gerrit-Owner: David Caro <dcaro...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to