[LIBREPORT PATCH] Replace %reporter thing in BZ reporter with "libreport_version" element
Jiri Moskovcak
jmoskovc at redhat.com
Thu Sep 5 12:02:05 UTC 2013
Ok, I can create it myself, but the patch is missing the ticket number.
--Jirka
On 09/05/2013 01:37 PM, Jiri Moskovcak wrote:
> Have you tried to create a bz with your patch, I'd like to take a look
> at the results.
>
> Thanks,
> Jirka
>
> On 09/05/2013 01:30 PM, Denys Vlasenko wrote:
>> Rationale for %reporter was that created BZ's need information
>> which version of libreport was creating them.
>> But the same thing will be needed by other users of our data.
>> Adding it only in BZ reporter is a wrong place.
>>
>> We already create "abrt_version" element, I copied the logic
>> and this change creates similar "libreport_version" element.
>>
>> BZ reporter will show it along with other one-liners.
>>
>> Signed-off-by: Denys Vlasenko <dvlasenk at redhat.com>
>> ---
>> src/include/internal_libreport.h | 1 +
>> src/lib/dump_dir.c | 2 ++
>> src/plugins/bugzilla_format.conf | 1 -
>> src/plugins/bugzilla_format_kernel.conf | 2 +-
>> src/plugins/bugzilla_format_libreport.conf | 1 -
>> src/plugins/bugzilla_formatdup.conf | 1 -
>> src/plugins/reporter-bugzilla.c | 4 ----
>> 7 files changed, 4 insertions(+), 8 deletions(-)
>>
>> diff --git a/src/include/internal_libreport.h
>> b/src/include/internal_libreport.h
>> index ae46ad4..6076823 100644
>> --- a/src/include/internal_libreport.h
>> +++ b/src/include/internal_libreport.h
>> @@ -861,6 +861,7 @@ struct dump_dir *open_directory_for_writing(
>> #define FILENAME_PKG_ARCH "pkg_arch"
>> #define FILENAME_USERNAME "username"
>> #define FILENAME_ABRT_VERSION "abrt_version"
>> +#define FILENAME_LIBREPORT_VERSION "libreport_version"
>>
>> // Not stored as files, added "on the fly":
>> #define CD_DUMPDIR "Directory"
>> diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
>> index 4bb23ba..9ff51b4 100644
>> --- a/src/lib/dump_dir.c
>> +++ b/src/lib/dump_dir.c
>> @@ -629,6 +629,8 @@ void dd_create_basic_files(struct dump_dir *dd,
>> uid_t uid, const char *chroot_di
>> }
>> free(time_str);
>>
>> + dd_save_text(dd, FILENAME_LIBREPORT_VERSION, PACKAGE"-"VERSION);
>> +
>> /* it doesn't make sense to create the uid file if uid == -1 */
>> if (uid != (uid_t)-1L)
>> {
>> diff --git a/src/plugins/bugzilla_format.conf
>> b/src/plugins/bugzilla_format.conf
>> index cad5876..f928799 100644
>> --- a/src/plugins/bugzilla_format.conf
>> +++ b/src/plugins/bugzilla_format.conf
>> @@ -48,7 +48,6 @@ Additional info:: \
>> -analyzer,-count,-duphash,-uuid,-abrt_version,\
>> -username,-hostname,-os_release,-os_info,\
>> -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
>> - %reporter,\
>> %oneline
>>
>> Truncated backtrace:: %bare_%short_backtrace
>> diff --git a/src/plugins/bugzilla_format_kernel.conf
>> b/src/plugins/bugzilla_format_kernel.conf
>> index e46af89..c32e424 100644
>> --- a/src/plugins/bugzilla_format_kernel.conf
>> +++ b/src/plugins/bugzilla_format_kernel.conf
>> @@ -40,6 +40,6 @@
>>
>> Description of problem:: %bare_comment
>>
>> -Additional info:: %reporter, %bare_backtrace
>> +Additional info:: %bare_backtrace
>>
>> %attach:: dmesg
>> diff --git a/src/plugins/bugzilla_format_libreport.conf
>> b/src/plugins/bugzilla_format_libreport.conf
>> index 2ecdf6f..352be98 100644
>> --- a/src/plugins/bugzilla_format_libreport.conf
>> +++ b/src/plugins/bugzilla_format_libreport.conf
>> @@ -50,7 +50,6 @@ Additional info:: \
>> -analyzer,-count,-duphash,-uuid,-abrt_version,\
>> -username,-hostname,-os_release,-os_info,\
>> -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
>> - %reporter,\
>> %oneline
>>
>> Truncated backtrace:: %bare_%short_backtrace
>> diff --git a/src/plugins/bugzilla_formatdup.conf
>> b/src/plugins/bugzilla_formatdup.conf
>> index f5e89f7..6f51606 100644
>> --- a/src/plugins/bugzilla_formatdup.conf
>> +++ b/src/plugins/bugzilla_formatdup.conf
>> @@ -49,5 +49,4 @@
>> -username,-hostname,-os_release,-os_info,\
>> -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
>> -var_log_messages,\
>> - %reporter,\
>> %oneline
>> diff --git a/src/plugins/reporter-bugzilla.c
>> b/src/plugins/reporter-bugzilla.c
>> index 05439cd..cd3cf15 100644
>> --- a/src/plugins/reporter-bugzilla.c
>> +++ b/src/plugins/reporter-bugzilla.c
>> @@ -405,10 +405,6 @@ int append_item(struct strbuf *result, const char
>> *item_name, problem_data_t *pd
>> if (strcmp(item_name, "%short_backtrace") == 0)
>> return append_short_backtrace(result, pd,
>> CD_TEXT_ATT_SIZE_BZ, print_item_name);
>>
>> - /* Compat with previously-existed ad-hockery: %reporter */
>> - if (strcmp(item_name, "%reporter") == 0)
>> - return append_text(result, "reporter", PACKAGE"-"VERSION,
>> print_item_name);
>> -
>> /* %oneline,%multiline,%text */
>> bool oneline = (strcmp(item_name+1, "oneline" ) == 0);
>> bool multiline = (strcmp(item_name+1, "multiline") == 0);
>>
>
More information about the Crash-catcher
mailing list