This feature is not used in rhel world at all. It only brings obfuscated code.
Signed-off-by: Nikola Pajkovsky npajkovs@redhat.com --- src/plugins/reporter-bugzilla.c | 37 ++++++------------------------------- src/plugins/rhbz.c | 35 ++++++++++------------------------- src/plugins/rhbz.h | 3 +-- 3 files changed, 17 insertions(+), 58 deletions(-)
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c index ee0da0f..825c92a 100644 --- a/src/plugins/reporter-bugzilla.c +++ b/src/plugins/reporter-bugzilla.c @@ -288,15 +288,14 @@ int main(int argc, char **argv)
bugzilla client is looking for duplicate bug by sending xmlrpc query
- "ALL whiteboard:<hash> component:<name> [product:<product>]" + "ALL whiteboard:<hash> product:<product> component:<name>"
so if bug is moved from component selinux-policy to other, then query returns NULL and creates a new bug. */ - const char *product_substitute = (!strcmp(rhbz.b_product, "Fedora")) ? rhbz.b_product : NULL; const char *component_substitute = (!strcmp(component, "selinux-policy")) ? NULL : component; xmlrpc_value *result = rhbz_search_duphash(client, component_substitute, - product_substitute, duphash); + rhbz.b_product, duphash);
xmlrpc_value *all_bugs = rhbz_get_member("bugs", result); xmlrpc_DECREF(result); @@ -309,39 +308,15 @@ int main(int argc, char **argv) VERB3 log("Bugzilla has %i reports with same duphash '%s'", all_bugs_size, duphash);
- int bug_id = -1; - struct bug_info *bz = NULL; - if (all_bugs_size > 0) - { - bug_id = rhbz_bug_id(all_bugs); - xmlrpc_DECREF(all_bugs); - bz = rhbz_bug_info(client, bug_id); - - if (strcmp(bz->bi_product, rhbz.b_product) != 0) - { - /* found something, but its a different product */ - free_bug_info(bz); - - xmlrpc_value *result = rhbz_search_duphash(client, component_substitute, - product_substitute, duphash); - xmlrpc_value *all_bugs = rhbz_get_member("bugs", result); - xmlrpc_DECREF(result); - - all_bugs_size = rhbz_array_size(all_bugs); - if (all_bugs_size > 0) - { - bug_id = rhbz_bug_id(all_bugs); - bz = rhbz_bug_info(client, bug_id); - } - xmlrpc_DECREF(all_bugs); - } - } + int bug_id = rhbz_bug_id(all_bugs); + xmlrpc_DECREF(all_bugs); + struct bug_info *bz = rhbz_bug_info(client, bug_id);
if (all_bugs_size == 0) { /* Create new bug */ log(_("Creating a new bug")); - bug_id = rhbz_new_bug(client, problem_data, rhbz.b_release, bug_id); + bug_id = rhbz_new_bug(client, problem_data, rhbz.b_release);
log(_("Adding attachments to bug %i"), bug_id); char bug_id_str[sizeof(int)*3 + 2]; diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c index 32b61dc..9ed3154 100644 --- a/src/plugins/rhbz.c +++ b/src/plugins/rhbz.c @@ -383,8 +383,7 @@ struct bug_info *rhbz_bug_info(struct abrt_xmlrpc *ax, int bug_id)
/* suppress mail notify by {s:i} (nomail:1) (driven by flag) */ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, - const char *release, - int depend_on_bug) + const char *release) { const char *package = get_problem_item_content_or_NULL(problem_data, FILENAME_PACKAGE); @@ -449,29 +448,15 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
xmlrpc_value* result = NULL; char *summary = strbuf_free_nobuf(buf_summary); - if (depend_on_bug > -1) - { - result = abrt_xmlrpc_call(ax, "Bug.create", "({s:s,s:s,s:s,s:s,s:s,s:s,s:s,s:i})", - "product", product, - "component", component, - "version", version, - "summary", summary, - "description", full_dsc, - "status_whiteboard", status_whiteboard, - "platform", arch, - "dependson", depend_on_bug); - } - else - { - result = abrt_xmlrpc_call(ax, "Bug.create", "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})", - "product", product, - "component", component, - "version", version, - "summary", summary, - "description", full_dsc, - "status_whiteboard", status_whiteboard, - "platform", arch); - } + result = abrt_xmlrpc_call(ax, "Bug.create", "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})", + "product", product, + "component", component, + "version", version, + "summary", summary, + "description", full_dsc, + "status_whiteboard", status_whiteboard, + "platform", arch); + free(status_whiteboard); free(product); free(version); diff --git a/src/plugins/rhbz.h b/src/plugins/rhbz.h index 17533a4..979cef2 100644 --- a/src/plugins/rhbz.h +++ b/src/plugins/rhbz.h @@ -97,8 +97,7 @@ int rhbz_array_size(xmlrpc_value *xml); int rhbz_bug_id(xmlrpc_value *xml);
int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, - const char *release, - int depend_on_bug); + const char *release);
int rhbz_attach_big_files(struct abrt_xmlrpc *ax, const char *bug_id, problem_data_t *problem_data, int flags);
crash-catcher@lists.fedorahosted.org