On 05/22/2011 09:35 PM, Denys Vlasenko wrote:
On Fri, 2011-05-20 at 14:08 +0200, Jiri Moskovcak wrote:
> I pushed the proposed changes, the only thing which has left to fix is
> getting the component name (problem_data.c: 129). I need to ask rpm for
> it and there are few possible solution:
>
> 1. call abrt-action-save-package-data
> 2. $ rpm -qf executable
> 3. use librpm
>
> Suggestions?
I propose to add two more flags: LIBREPORT_ANALYZE and
LIBREPORT_RELOAD_DATA, but reduce the number of functions from four to
two:
int report_problem_in_dir(const char *dirname, int flags);
int report_problem_data_t(problem_data_t *pd, int flags);
- ok, but I still would like to have:
int report(problem_data_t *pd);
- which would be just a convenience wrapper which calls
report_problem_data_t() and simply hides the flags and cover the most
common use case which are flags: WAIT | LIBREPORT_RELOAD_DATA
Patch is below.
A further possible improvement is to add
"bug-reporting-wizard --delete-dir" option. It will make this work:
report_problem_data_t(pd, LIBREPORT_NOWAIT);
- ok, btw how about to move the tmp files to /var/tmp where it would be
removed automatically once in a while (e.g: if libreport fails to remove it)
without leaving stray temp dir in /tmp.