Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > af98abfd9492b11947009fa207393390 > files > 11

abrt-1.1.1-1mdv2010.1.src.rpm

From ea49247467d26eb664e8fb67c77e58c1f41675b1 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@mandriva.com>
Date: Mon, 1 Mar 2010 18:27:59 +0100
Subject: [PATCH 4/9] use mandriva bugzilla

---
 lib/Plugins/Bugzilla.GTKBuilder |    2 +-
 lib/Plugins/Bugzilla.conf       |    2 +-
 lib/Plugins/Bugzilla.cpp        |   22 +++++++++++++++-------
 lib/Plugins/abrt-Bugzilla.7     |    2 +-
 4 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/lib/Plugins/Bugzilla.GTKBuilder b/lib/Plugins/Bugzilla.GTKBuilder
index a071bd7..d4de6ab 100644
--- a/lib/Plugins/Bugzilla.GTKBuilder
+++ b/lib/Plugins/Bugzilla.GTKBuilder
@@ -183,7 +183,7 @@
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
                 <property name="xpad">5</property>
-                <property name="label" translatable="yes">You can create it &lt;a href="https://bugzilla.redhat.com/createaccount.cgi"&gt;here&lt;/a&gt;</property>
+                <property name="label" translatable="yes">You can create it &lt;a href="https://qa.mandriva.com/createaccount.cgi"&gt;here&lt;/a&gt;</property>
                 <property name="use_markup">True</property>
                 <property name="selectable">True</property>
               </object>
diff --git a/lib/Plugins/Bugzilla.conf b/lib/Plugins/Bugzilla.conf
index ff2f828..69dd2f9 100644
--- a/lib/Plugins/Bugzilla.conf
+++ b/lib/Plugins/Bugzilla.conf
@@ -1,6 +1,6 @@
 Enabled = yes
 # Bugzilla URL
-BugzillaURL = https://bugzilla.redhat.com/
+BugzillaURL = https://qa.mandriva.com/
 # yes means that ssl certificates will not be checked
 NoSSLVerify = no
 # your login has to exist, if you don have any, please create one
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index 18df721..f5ed4ae 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -300,7 +300,7 @@ void ctx::get_bug_cc(xmlrpc_value* result_xml, struct bug_info* bz)
 
 xmlrpc_value* ctx::call_quicksearch_duphash(const char* component, const char* duphash)
 {
-    std::string query = ssprintf("ALL component:\"%s\" statuswhiteboard:\"%s\"", component, duphash);
+    std::string query = ssprintf("ALL cf_rpmpkg:\"%s\" statuswhiteboard:\"%s\"", component, duphash);
     return call("Bug.search", "({s:s})", "quicksearch", query.c_str());
 }
 
@@ -377,14 +377,22 @@ xmlrpc_int32 ctx::new_bug(const map_crash_data_t& pCrashData)
     std::string version;
     parse_release(release.c_str(), product, version);
 
+    std::string bugzilla_arch;
+    if (arch.compare("i686")) {
+	    bugzilla_arch = "i586";
+    } else {
+	    bugzilla_arch = arch;
+    }
+
     xmlrpc_value* result = call("Bug.create", "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})",
                                 "product", product.c_str(),
-                                "component", component.c_str(),
+                                "component", "Core Packages",
+                                "cf_rpmpkg", package.c_str(),
                                 "version", version.c_str(),
                                 "summary", summary.c_str(),
                                 "description", description.c_str(),
                                 "status_whiteboard", status_whiteboard.c_str(),
-                                "platform", arch.c_str()
+                                "platform", bugzilla_arch.c_str()
                               );
     if (!result)
         return -1;
@@ -574,8 +582,8 @@ static map_plugin_settings_t parse_settings(const map_plugin_settings_t& pSettin
 
 CReporterBugzilla::CReporterBugzilla() :
     m_bNoSSLVerify(false),
-    m_sBugzillaURL("https://bugzilla.redhat.com"),
-    m_sBugzillaXMLRPC("https://bugzilla.redhat.com"XML_RPC_SUFFIX)
+    m_sBugzillaURL("https://qa.mandriva.com"),
+    m_sBugzillaXMLRPC("https://qa.mandriva.com"XML_RPC_SUFFIX)
 {}
 
 CReporterBugzilla::~CReporterBugzilla()
@@ -671,12 +679,12 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData,
         );
         return bug_status;
     }
-    else if (all_bugs_size > 1)
+/*    else if (all_bugs_size > 1)
     {
         // When someone clones bug it has same duphash, so we can find more than 1.
         // Need to be checked if component is same.
         VERB3 log("Bugzilla has %u reports with same duphash '%s'", all_bugs_size, duphash.c_str());
-    }
+    }*/
 
     // decision based on state
     bug_id = bz_server.get_bug_id(all_bugs);
diff --git a/lib/Plugins/abrt-Bugzilla.7 b/lib/Plugins/abrt-Bugzilla.7
index 99bb60d..0357a16 100644
--- a/lib/Plugins/abrt-Bugzilla.7
+++ b/lib/Plugins/abrt-Bugzilla.7
@@ -20,7 +20,7 @@ The \fIBugzilla.conf\fP configuration file contains several
 entries in the format "Option = Value". The options are:
 .SS BugzillaURL
 The URL of the Bugzilla instance that you want to use, including the
-path to the xmlrpc. The default is https://bugzilla.redhat.com/xmlrpc.cgi
+path to the xmlrpc. The default is https://qa.mandriva.com/xmlrpc.cgi
 .SS Login
 Your Bugzilla login. If you have no Bugzilla account, you cannot
 use the plugin.
-- 
1.7.1