Rebuild due to bug in bugzilla summary formatting

Resolves: #879846
This commit is contained in:
Jakub Filak 2012-11-26 15:28:40 +01:00
parent 9ec64a4cc0
commit 8d38bd1405
2 changed files with 80 additions and 1 deletions

View File

@ -0,0 +1,73 @@
From 86b383640cba5834e7185901d00edc35dbb8ff35 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 26 Nov 2012 15:59:29 +0100
Subject: [LIBREPORT PATCH] fix bugzilla summary formatting
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/bugzilla_event.conf | 4 +++-
src/plugins/reporter-bugzilla.c | 15 +++++----------
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/src/plugins/bugzilla_event.conf b/src/plugins/bugzilla_event.conf
index 109c581..d3355a3 100644
--- a/src/plugins/bugzilla_event.conf
+++ b/src/plugins/bugzilla_event.conf
@@ -1 +1,3 @@
-EVENT=report_Bugzilla analyzer=libreport reporter-bugzilla -b
+EVENT=report_Bugzilla analyzer=libreport
+ reporter-bugzilla -b \
+ -F /etc/libreport/plugins/bugzilla_format_libreport.conf
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
index 78b8b11..2623122 100644
--- a/src/plugins/reporter-bugzilla.c
+++ b/src/plugins/reporter-bugzilla.c
@@ -224,9 +224,7 @@ char *format_percented_string(const char *str, problem_data_t *pd)
char *nextpercent = strchr(++str, '%');
if (!nextpercent)
{
- error_msg("Unterminated %%element%%: '%s'", str - 1);
- strbuf_free(result);
- return NULL;
+ error_msg_and_die("Unterminated %%element%%: '%s'", str - 1);
}
*nextpercent = '\0';
@@ -244,16 +242,12 @@ char *format_percented_string(const char *str, problem_data_t *pd)
if (opt_depth > 1)
{
- error_msg("Unbalanced [[ ]] bracket");
- strbuf_free(result);
- return NULL;
+ error_msg_and_die("Unbalanced [[ ]] bracket");
}
if (!okay[0])
{
error_msg("Undefined variable outside of [[ ]] bracket");
- strbuf_free(result);
- return NULL;
}
return strbuf_free_nobuf(result);
@@ -274,13 +268,14 @@ char *create_summary_string(problem_data_t *pd, GList *comment_fmt_spec)
GList *item = sec->items;
if (!item)
- return NULL;
+ /* not supposed to happen, there will be at least "" */
+ error_msg_and_die("BUG in %%summary parser");
const char *str = item->data;
return format_percented_string(str, pd);
}
- return format_percented_string("%comment%", pd);
+ return format_percented_string("%reason%", pd);
}
--
1.7.11.7

View File

@ -5,11 +5,12 @@
Summary: Generic library for reporting various problems
Name: libreport
Version: 2.0.19
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: https://fedorahosted.org/abrt/
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
Patch0: libreport-2.0.19-bugzilla_summary_formatting.patch
BuildRequires: dbus-devel
BuildRequires: gtk3-devel
@ -226,6 +227,7 @@ Plugin to report bugs into anonymous FTP site associated with ticketing system.
%prep
%setup -q
%patch0 -p1
%build
autoconf
@ -402,6 +404,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf
%changelog
* Mon Nov 26 2012 Jakub Filak <jfilak@redhat.com> 2.0.19-2
- fix bugzilla summary formatting
- Resolves: #879846
* Wed Nov 14 2012 Jakub Filak <jfilak@redhat.com> 2.0.19-1
- introduce a new formating feature for Bugzilla plugin
- use gtk_show_uri() instead of own launcher