* this functionality was put to the rhbz_new_bug() function because it is a part of new bug creation process
Signed-off-by: Jakub Filak jfilak@redhat.com --- src/plugins/rhbz.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c index b4a5a06..7ea9ff6 100644 --- a/src/plugins/rhbz.c +++ b/src/plugins/rhbz.c @@ -624,6 +624,9 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, FILENAME_ANALYZER); const char *tainted_short = problem_data_get_content_or_NULL(problem_data, FILENAME_TAINTED_SHORT); + const char *comment = problem_data_get_content_or_NULL(problem_data, + FILENAME_COMMENT); +
struct strbuf *buf_summary = strbuf_new(); if (analyzer && strcmp(analyzer, "libreport") == 0) @@ -660,9 +663,6 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, } else { - const char *comment = problem_data_get_content_or_NULL(problem_data, - FILENAME_COMMENT); - char *bz_dsc = make_description(problem_data, (char**)g_additional_info_files, CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
@@ -751,6 +751,14 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, free(r);
log(_("New bug id: %i"), new_bug_id); + + if (comment && analyzer && strcmp(analyzer, "Kerneloops") == 0) + { + /* Please, see rhbz#711591, rhbz#795548 and rhbz#846389 */ + log("Adding comment #1 with user's comment to kernel bug %i", new_bug_id); + rhbz_add_comment(ax, new_bug_id, comment, 0); + } + return new_bug_id; }
On 08/09/2012 11:22 AM, Jakub Filak wrote:
- this functionality was put to the rhbz_new_bug() function because it is a part of new bug creation process
Signed-off-by: Jakub Filak jfilak@redhat.com
src/plugins/rhbz.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c index b4a5a06..7ea9ff6 100644 --- a/src/plugins/rhbz.c +++ b/src/plugins/rhbz.c @@ -624,6 +624,9 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, FILENAME_ANALYZER); const char *tainted_short = problem_data_get_content_or_NULL(problem_data, FILENAME_TAINTED_SHORT);
const char *comment = problem_data_get_content_or_NULL(problem_data,
FILENAME_COMMENT);
struct strbuf *buf_summary = strbuf_new(); if (analyzer && strcmp(analyzer, "libreport") == 0)
@@ -660,9 +663,6 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, } else {
const char *comment = problem_data_get_content_or_NULL(problem_data,
FILENAME_COMMENT);
char *bz_dsc = make_description(problem_data, (char**)g_additional_info_files, CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
@@ -751,6 +751,14 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data, free(r);
log(_("New bug id: %i"), new_bug_id);
- if (comment && analyzer && strcmp(analyzer, "Kerneloops") == 0)
- {
/* Please, see rhbz#711591, rhbz#795548 and rhbz#846389 */
log("Adding comment #1 with user's comment to kernel bug %i", new_bug_id);
rhbz_add_comment(ax, new_bug_id, comment, 0);
- }
- return new_bug_id;
}
I propose to just add FILENAME_COMMENT here in libreport/src/lib/make_descr.c:
/* Items we want to include to bz */ static const char *const whitelisted_items[] = { FILENAME_CMDLINE, FILENAME_BACKTRACE, NULL };
On Thursday 09 of August 2012 14:28:47 Denys Vlasenko wrote:
On 08/09/2012 11:22 AM, Jakub Filak wrote:
this functionality was put to the rhbz_new_bug() function because it
is a part of new bug creation process
Signed-off-by: Jakub Filak jfilak@redhat.com
src/plugins/rhbz.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c index b4a5a06..7ea9ff6 100644 --- a/src/plugins/rhbz.c +++ b/src/plugins/rhbz.c @@ -624,6 +624,9 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,> FILENAME_ ANALYZER) ;
const char *tainted_short = problem_data_get_content_or_NULL(problem_data, FILENAME_ TAINTED_S HORT);
- const char *comment =
problem_data_get_content_or_NULL(problem_data, + FILENAME_COMMENT); +
struct strbuf *buf_summary = strbuf_new(); if (analyzer && strcmp(analyzer, "libreport") == 0)
@@ -660,9 +663,6 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,> } else {
const char *comment =
problem_data_get_content_or_NULL(problem_data, - FILENAME_COMMENT); -
char *bz_dsc = make_description(problem_data, (char**)g_additional_info_files,> CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
@@ -751,6 +751,14 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,> free(r);
log(_("New bug id: %i"), new_bug_id);
- if (comment && analyzer && strcmp(analyzer, "Kerneloops") == 0)
- {
/* Please, see rhbz#711591, rhbz#795548 and rhbz#846389 */
log("Adding comment #1 with user's comment to kernel bug %i",
new_bug_id); + rhbz_add_comment(ax, new_bug_id, comment, 0);
}
return new_bug_id;
}
I propose to just add FILENAME_COMMENT here in libreport/src/lib/make_descr.c:
/* Items we want to include to bz */ static const char *const whitelisted_items[] = { FILENAME_CMDLINE, FILENAME_BACKTRACE, NULL };
I've send a better patch: 2012-08-09 18:44 > [PATCH 2/2] rhbz#846389: generate koops description according to rhbz std template
crash-catcher@lists.fedorahosted.org