[PATCH] Analyze backtraces from retrace server
by Karel Klic
Hi,
the attached patch splits a part of abrt-action-generate-backtrace to a
new tool abrt-action-analyze-backtrace, which is used by both LocalGDB
and RetraceServer analyzers.
Then new abrt-action-analyze-backtrace tool reads backtrace and
generates duplication hash, detects crash function, and provides
backtrace rating. These steps haven't been performed for remotely
analyzed crashes so far.
Karel
13 years
[PATCH 1/2] cli: remove last c++ism
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/cli/report.cpp | 98 +++++++++++++++++++++++++--------------------------
1 files changed, 48 insertions(+), 50 deletions(-)
diff --git a/src/cli/report.cpp b/src/cli/report.cpp
index 172cb8f..f00310e 100644
--- a/src/cli/report.cpp
+++ b/src/cli/report.cpp
@@ -534,9 +534,8 @@ static char *do_log_and_save_line(char *log_line, void *param)
l_state->last_line = log_line;
return NULL;
}
-static int run_events(const char *dump_dir_name,
- const vector_string_t& events
-) {
+static int run_events(const char *dump_dir_name, GList *events)
+{
int error_cnt = 0;
GList *env_list = NULL;
@@ -546,28 +545,28 @@ static int run_events(const char *dump_dir_name,
struct run_event_state *run_state = new_run_event_state();
run_state->logging_callback = do_log_and_save_line;
run_state->logging_param = &l_state;
- for (unsigned i = 0; i < events.size(); i++)
+ for (GList *li = events; li; li = li->next)
{
- std::string event = events[i];
+ char *event = (char *) li->data;
// Export overridden settings as environment variables
- env_list = export_event_config(event.c_str());
+ env_list = export_event_config(event);
- int r = run_event_on_dir_name(run_state, dump_dir_name, event.c_str());
+ int r = run_event_on_dir_name(run_state, dump_dir_name, event);
if (r == 0 && run_state->children_count == 0)
{
l_state.last_line = xasprintf("Error: no processing is specified for event '%s'",
- event.c_str());
+ event);
r = -1;
}
if (r == 0)
{
- printf("%s: %s\n", event.c_str(), (l_state.last_line ? : "Reporting succeeded"));
+ printf("%s: %s\n", event, (l_state.last_line ? : "Reporting succeeded"));
}
else
{
error_msg("Reporting via '%s' was not successful%s%s",
- event.c_str(),
+ event,
l_state.last_line ? ": " : "",
l_state.last_line ? l_state.last_line : ""
);
@@ -741,23 +740,17 @@ int report(const char *dump_dir_name, int flags)
/* Get possible reporters associated with this particular crash */
/* TODO: npajkovs: remove this annoying c++ vector_string_t */
- vector_string_t report_events;
+ GList *report_events = NULL;
if (report_events_as_lines && *report_events_as_lines)
+ report_events = str_to_glist(report_events_as_lines, '\n');
+
+ free(report_events_as_lines);
+
+ if (!report_events)
{
- char *events = report_events_as_lines;
- while (*events)
- {
- char *end = strchrnul(events, '\n');
- char *tmp = xstrndup(events, end - events);
- report_events.push_back(tmp);
- free(tmp);
- events = end;
- if (!*events)
- break;
- events++;
- }
+ free_crash_data(crash_data);
+ error_msg_and_die(_("No reporters selected, program exiting..."));
}
- free(report_events_as_lines);
/* Get settings */
load_event_config_data();
@@ -768,7 +761,7 @@ int report(const char *dump_dir_name, int flags)
{
puts(_("Reporting..."));
errors += run_events(dump_dir_name, report_events);
- plugins += report_events.size();
+ plugins += g_list_length(report_events);
}
else
{
@@ -776,11 +769,11 @@ int report(const char *dump_dir_name, int flags)
unsigned rating = rating_str ? xatou(rating_str) : 4;
/* For every reporter, ask if user really wants to report using it. */
- vector_string_t::const_iterator it;
- for (it = report_events.begin(); it != report_events.end(); ++it)
+ for (GList *li = report_events; li; li = li->next)
{
+ char *reporter_name = (char *) li->data;
char question[255];
- snprintf(question, sizeof(question), _("Report using %s?"), it->c_str());
+ snprintf(question, sizeof(question), _("Report using %s?"), reporter_name);
if (!ask_yesno(question))
{
puts(_("Skipping..."));
@@ -788,39 +781,44 @@ int report(const char *dump_dir_name, int flags)
}
//TODO: rethink how we associate report events with configs
- if (prefixcmp(it->c_str(), "report_") == 0)
+ event_config_t *config = get_event_config(reporter_name);
+ if (config)
{
- event_config_t *config = get_event_config(it->c_str());
-
- if (config)
+ /* TODO: npajkovs; not implemented yet */
+ //const char *rating_required = get_map_string_item_or_NULL(single_plugin_settings, "RatingRequired");
+ //if (rating_required
+ // && string_to_bool(rating_required) == true
+ if (rating < 3)
{
- /* TODO: npajkovs; not implemented yet */
- //const char *rating_required = get_map_string_item_or_NULL(single_plugin_settings, "RatingRequired");
- //if (rating_required
- // && string_to_bool(rating_required) == true
- if (rating < 3)
- {
- puts(_("Reporting disabled because the backtrace is unusable"));
-
- const char *package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE);
- if (package && package[0])
- printf(_("Please try to install debuginfo manually using the command: \"debuginfo-install %s\" and try again\n"), package);
-
- plugins++;
- errors++;
- continue;
- }
- ask_for_missing_settings(it->c_str());
+ puts(_("Reporting disabled because the backtrace is unusable"));
+
+ const char *package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE);
+ if (package && package[0])
+ printf(_("Please try to install debuginfo manually using the command: \"debuginfo-install %s\" and try again\n"), package);
+
+ plugins++;
+ errors++;
+ continue;
}
+ ask_for_missing_settings(reporter_name);
}
- vector_string_t cur_event(1, *it);
+ /*
+ * to avoid creating list with one item, we probably should
+ * provide something like
+ * run_event(char*, char*)
+ */
+ GList *cur_event = NULL;
+ cur_event = g_list_append(cur_event, reporter_name);
errors += run_events(dump_dir_name, cur_event);
+ g_list_free(cur_event);
+
plugins++;
}
}
printf(_("Crash reported via %d report events (%d errors)\n"), plugins, errors);
free_crash_data(crash_data);
+ list_free_with_free(report_events);
return errors;
}
--
1.7.1
13 years, 1 month
[PATCH] cli: show screen_name when abrt asks for reporters
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/cli/report.c | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/src/cli/report.c b/src/cli/report.c
index f00310e..f7af970 100644
--- a/src/cli/report.c
+++ b/src/cli/report.c
@@ -772,36 +772,40 @@ int report(const char *dump_dir_name, int flags)
for (GList *li = report_events; li; li = li->next)
{
char *reporter_name = (char *) li->data;
+ event_config_t *config = get_event_config(reporter_name);
+ if (!config)
+ {
+ log(_("No configuration file found for '%s' reporter, skipping..."),
+ reporter_name);
+ continue;
+ }
+
char question[255];
- snprintf(question, sizeof(question), _("Report using %s?"), reporter_name);
+ snprintf(question, sizeof(question), _("Report using %s?"),
+ (config->screen_name) ? config->screen_name : reporter_name);
if (!ask_yesno(question))
{
puts(_("Skipping..."));
continue;
}
-//TODO: rethink how we associate report events with configs
- event_config_t *config = get_event_config(reporter_name);
- if (config)
+ /* TODO: npajkovs; not implemented yet */
+ //const char *rating_required = get_map_string_item_or_NULL(single_plugin_settings, "RatingRequired");
+ //if (rating_required
+ // && string_to_bool(rating_required) == true
+ if (rating < 3)
{
- /* TODO: npajkovs; not implemented yet */
- //const char *rating_required = get_map_string_item_or_NULL(single_plugin_settings, "RatingRequired");
- //if (rating_required
- // && string_to_bool(rating_required) == true
- if (rating < 3)
- {
- puts(_("Reporting disabled because the backtrace is unusable"));
-
- const char *package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE);
- if (package && package[0])
- printf(_("Please try to install debuginfo manually using the command: \"debuginfo-install %s\" and try again\n"), package);
-
- plugins++;
- errors++;
- continue;
- }
- ask_for_missing_settings(reporter_name);
+ puts(_("Reporting disabled because the backtrace is unusable"));
+
+ const char *package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE);
+ if (package && package[0])
+ printf(_("Please try to install debuginfo manually using the command: \"debuginfo-install %s\" and try again\n"), package);
+
+ plugins++;
+ errors++;
+ continue;
}
+ ask_for_missing_settings(reporter_name);
/*
* to avoid creating list with one item, we probably should
--
1.7.1
13 years, 1 month
[PATCH] validate input in cli and fix ask_for_missing_settings function
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/cli/report.cpp | 93 +++++++++++++++++++++++-------------
src/include/report/event_config.h | 3 +
src/lib/event_config.c | 64 +++++++++++++++++++++++++
3 files changed, 126 insertions(+), 34 deletions(-)
diff --git a/src/cli/report.cpp b/src/cli/report.cpp
index 05f0b11..fe7a791 100644
--- a/src/cli/report.cpp
+++ b/src/cli/report.cpp
@@ -396,7 +396,6 @@ static int run_report_editor(crash_data_t *crash_data)
* @param result_size
* Maximum byte count to be written.
*/
-#if 0 /* error: ‘void read_from_stdin(const char*, char*, int)’ defined but not used (-Werror) */
static void read_from_stdin(const char *question, char *result, int result_size)
{
assert(result_size > 1);
@@ -407,7 +406,6 @@ static void read_from_stdin(const char *question, char *result, int result_size)
// Remove the newline from the login.
strchrnul(result, '\n')[0] = '\0';
}
-#endif
/**
* Asks a [y/n] question on stdin/stdout.
@@ -429,7 +427,6 @@ static bool ask_yesno(const char *question)
return 0 == strncmp(answer, yes, strlen(yes));
}
-#if 0 /* error: ‘bool set_echo(bool)’ defined but not used (-Werror) */
/* Returns true if echo has been changed from another state. */
static bool set_echo(bool enable)
{
@@ -447,48 +444,76 @@ static bool set_echo(bool enable)
return true;
}
-#endif
/**
* Asks user for missing information
*/
-#if 0 /* TODO: npajkovs: FIX ME!!! */
static void ask_for_missing_settings(const char *event_name)
{
- event_config_t *config = get_event_config(event_name);
- event_option_t *login, *passwd;
- login = get_event_option_from_list("Bugzilla_Login", config->options);
- passwd = get_event_option_from_list("Bugzilla_Password", config->options);
-
- int login_missing = (login && login->value && login->value[0] == '\0');
- int passwd_missing = (passwd && passwd->value && passwd->value[0] == '\0');
- if (!login_missing && !passwd_missing)
+ GHashTable *error_table = validate_event(event_name);
+ if (!error_table)
return;
- // Read the missing information and push it to plugin settings.
- printf(_("Wrong settings were detected for plugin %s\n"), event_name);
- char result[64];
- if (login_missing)
- {
- free(login->value);
- read_from_stdin(_("Enter your login: "), result, 64);
- login->value = xstrdup(result);
- }
+ event_config_t *event_config = get_event_config(event_name);
- if (passwd_missing)
+ GHashTableIter iter;
+ char *missing_value, *err_msg;
+ g_hash_table_iter_init(&iter, error_table);
+ while (g_hash_table_iter_next(&iter, (void**)&missing_value, (void**)&err_msg))
{
- bool changed = set_echo(false);
- free(passwd->value);
- read_from_stdin(_("Enter your password: "), result, 64);
- if (changed)
- set_echo(true);
-
- passwd->value = xstrdup(result);
- // Newline was not added by pressing Enter because ECHO was disabled, so add it now.
- puts("");
+ event_option_t *opt = get_event_option_from_list(missing_value,
+ event_config->options);
+
+ char result[512];
+
+ char *question = xasprintf(_("Enter your %s: "), opt->label);
+ switch (opt->type) {
+ case OPTION_TYPE_TEXT:
+ case OPTION_TYPE_NUMBER:
+ read_from_stdin(question, result, 512);
+ opt->value = xstrdup(result);
+ break;
+ case OPTION_TYPE_PASSWORD:
+ {
+ bool changed = set_echo(false);
+ read_from_stdin(question, result, 512);
+ if (changed)
+ set_echo(true);
+
+ opt->value = xstrdup(result);
+ /* Newline was not added by pressing Enter because ECHO was
+ disabled, so add it now. */
+ puts("");
+ break;
+ }
+ case OPTION_TYPE_BOOL:
+ free(question);
+ question = xasprintf("Using %s", opt->label);
+ if (ask_yesno(question))
+ opt->value = xstrdup("yes");
+ else
+ opt->value = xstrdup("no");
+
+ VERB3 log("bool = %s", opt->value);
+ break;
+ case OPTION_TYPE_INVALID:
+ break;
+ };
}
+
+ g_hash_table_destroy(error_table);
+
+ error_table = validate_event(event_name);
+ if (!error_table)
+ return;
+
+ log(_("Your input is not valid, because of:"));
+ g_hash_table_iter_init(&iter, error_table);
+ while (g_hash_table_iter_next(&iter, (void**)&missing_value, (void**)&err_msg))
+ log("%s: %s", missing_value, err_msg);
+
+ g_hash_table_destroy(error_table);
}
-#endif
struct logging_state {
char *last_line;
@@ -698,7 +723,7 @@ int report(const char *dump_dir_name, int flags)
errors++;
continue;
}
- // ask_for_missing_settings(it->c_str());
+ ask_for_missing_settings(it->c_str());
}
}
diff --git a/src/include/report/event_config.h b/src/include/report/event_config.h
index 12beefe..72b1d8c 100644
--- a/src/include/report/event_config.h
+++ b/src/include/report/event_config.h
@@ -89,6 +89,9 @@ extern GHashTable *g_event_config_list; // for iterating through entire list o
GList *export_event_config(const char *event_name);
void unexport_event_config(GList *env_list);
+GHashTable *validate_event(const char *event_name);
+char *validate_event_option(event_option_t *opt);
+
#ifdef __cplusplus
}
#endif
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
index 3f76021..4502a83 100644
--- a/src/lib/event_config.c
+++ b/src/lib/event_config.c
@@ -280,3 +280,67 @@ void unexport_event_config(GList *env_list)
free(var_val);
}
}
+
+GHashTable *validate_event(const char *event_name)
+{
+ event_config_t *config = get_event_config(event_name);
+ if (!config)
+ return NULL;
+
+
+ GHashTable *errors = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
+
+ for (GList *li = config->options; li; li = li->next)
+ {
+ event_option_t *opt = (event_option_t *)li->data;
+ char *err = validate_event_option(opt);
+ if (err)
+ g_hash_table_insert(errors, xstrdup(opt->name), err);
+ }
+
+ return errors;
+}
+
+/* return NULL if successful otherwise appropriate error message */
+char *validate_event_option(event_option_t *opt)
+{
+ if (!opt->allow_empty && (!opt->value || !opt->value[0]))
+ return xasprintf(_("Missing mandatory %s value"), opt->name);
+
+ /* if value is NULL and allow-empty yes than it doesn't make sence to check it */
+ if (!opt->value)
+ return NULL;
+
+ const gchar *s = NULL;
+ if (!g_utf8_validate(opt->value, -1, &s))
+ return xasprintf(_("Invalid utf8 character '%c'"), *s);
+
+ switch (opt->type) {
+ case OPTION_TYPE_TEXT:
+ case OPTION_TYPE_PASSWORD:
+ break;
+ case OPTION_TYPE_NUMBER:
+ {
+ long r = strtol(opt->value, (char **)&s, 10);
+ (void) r;
+ if (*s)
+ return xasprintf(_("Invalid number '%s'"), opt->value);
+ break;
+ }
+ case OPTION_TYPE_BOOL:
+ if (strcmp(opt->value, "yes") != 0
+ && strcmp(opt->value, "no") != 0
+ && strcmp(opt->value, "on") != 0
+ && strcmp(opt->value, "off") != 0
+ && strcmp(opt->value, "1") != 0
+ && strcmp(opt->value, "0") != 0)
+ {
+ return xasprintf(_("Invalid boolean value '%s'"), opt->value);
+ }
+ break;
+ default:
+ return xstrdup(_("Unsupported option type"));
+ };
+
+ return NULL;
+}
--
1.7.1
13 years, 1 month
[PATCH] remove misleading error message
by Nikola Pajkovsky
solution isn't good enough, but truly remove misleading message. Imagine
the situation when user manually set environment Bugzilla_Password and manually
run command a-a-b -c /path/to/config1 -c /path/config2 -c /path/config3.
Now a-a-b smash all configs into one giant hash table. Just stir the pot.
Environment can be set by cli and gui. We have a lot of input how to set
config and question is how to determinate which config is wrong and blame
someone/something.
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/plugins/abrt-action-bugzilla.cpp | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp
index e5e5bc8..e066142 100644
--- a/src/plugins/abrt-action-bugzilla.cpp
+++ b/src/plugins/abrt-action-bugzilla.cpp
@@ -643,9 +643,7 @@ static void report_to_bugzilla(
env = getenv("Bugzilla_Password");
password = env ? env : get_map_string_item_or_empty(settings, "Password");
if (!login[0] || !password[0])
- {
- error_msg_and_die(_("Empty login or password, please check %s"), PLUGINS_CONF_DIR"/Bugzilla.conf");
- }
+ error_msg_and_die(_("Empty login or password, please check your configuration"));
env = getenv("Bugzilla_BugzillaURL");
bugzilla_url = env ? env : get_map_string_item_or_empty(settings, "BugzillaURL");
--
1.7.1
13 years, 1 month
[PATCH] Ticket #178 - abrt-cli should provide an option to select analyzer
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/cli/cli.c | 34 +++++++++++++++-
src/cli/report.cpp | 96 ++++++++++++++++++++++++++++++++++++++++++----
src/cli/report.h | 3 +-
src/plugins/Makefile.am | 4 +-
4 files changed, 122 insertions(+), 15 deletions(-)
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 0c895a7..a9e70bc 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -360,6 +360,9 @@ int main(int argc, char** argv)
print_usage_and_die(argv[0]);
}
+ /* Get settings */
+ load_event_config_data();
+
/* Do the selected operation. */
int exitcode = 0;
switch (op)
@@ -409,15 +412,40 @@ int main(int argc, char** argv)
}
case OPT_INFO:
{
- if (run_analyze_event(dump_dir_name) != 0)
- return 1;
-
/* Load crash_data from (possibly updated by analyze) dump dir */
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
return -1;
+
+ char *events_as_lines = list_possible_events(dd, NULL, "analyze");
crash_data_t *crash_data = create_crash_data_from_dump_dir(dd);
dd_close(dd);
+
+ GList *list_events = NULL;
+ if (events_as_lines && *events_as_lines)
+ {
+ char *events = events_as_lines;
+ while (*events)
+ {
+ char *end = strchrnul(events, '\n');
+ char *tmp = xstrndup(events, end - events);
+ list_events = g_list_append(list_events, tmp);
+ events = end;
+ if (!*events)
+ break;
+ events++;
+ }
+
+ char *event = select_event_option(list_events);
+ list_free_with_free(list_events);
+
+ int analyzer_result = run_analyze_event(dump_dir_name, event);
+ free(event);
+
+ if (analyzer_result != 0)
+ return 1;
+ }
+
add_to_crash_data_ext(crash_data, CD_DUMPDIR, dump_dir_name,
CD_FLAG_TXT + CD_FLAG_ISNOTEDITABLE);
diff --git a/src/cli/report.cpp b/src/cli/report.cpp
index da37bea..f1836b4 100644
--- a/src/cli/report.cpp
+++ b/src/cli/report.cpp
@@ -15,9 +15,9 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "report.h"
-#include "run-command.h"
#include "abrtlib.h"
+#include "run-command.h"
+#include "report.h"
/* Field separator for the crash report file that is edited by user. */
#define FIELD_SEP "%----"
@@ -553,7 +553,8 @@ static int run_events(const char *dump_dir_name,
int r = run_event_on_dir_name(run_state, dump_dir_name, event.c_str());
if (r == 0 && run_state->children_count == 0)
{
- l_state.last_line = xasprintf("Error: no processing is specified for event '%s'", event.c_str());
+ l_state.last_line = xasprintf("Error: no processing is specified for event '%s'",
+ event.c_str());
r = -1;
}
if (r == 0)
@@ -585,33 +586,110 @@ static char *do_log(char *log_line, void *param)
log("%s", log_line);
return log_line;
}
-int run_analyze_event(const char *dump_dir_name)
+
+int run_analyze_event(const char *dump_dir_name, const char *analyzer)
{
VERB2 log("run_analyze_event('%s')", dump_dir_name);
struct run_event_state *run_state = new_run_event_state();
run_state->logging_callback = do_log;
- int res = run_event_on_dir_name(run_state, dump_dir_name, "analyze_LocalGDB");
+ int res = run_event_on_dir_name(run_state, dump_dir_name, analyzer);
free_run_event_state(run_state);
return res;
}
+/* show even description? */
+char *select_event_option(GList *list_options)
+{
+ if (!list_options)
+ return NULL;
+
+ unsigned count = g_list_length(list_options) - 1;
+ if (!count)
+ return NULL;
+
+ int pos = -1;
+ fprintf(stdout, "Select how you would like to analyze the problem:\n");
+ for (GList *li = list_options; li; li = li->next)
+ {
+ char *opt = (char*)li->data;
+ event_config_t *config = get_event_config(opt);
+ if (config)
+ {
+ ++pos;
+ printf(" %i) %s\n", pos, config->screen_name);
+ }
+ }
+
+ unsigned picked;
+ unsigned ii;
+ for (ii = 0; ii < 3; ++ii)
+ {
+ fprintf(stdout, "Choose option [0 - %u]: ", count);
+ fflush(NULL);
+
+ char answer[16];
+ if (!fgets(answer, sizeof(answer), stdin))
+ continue;
+
+ answer[strlen(answer) - 1] = '\0';
+ if (!*answer)
+ continue;
+
+ picked = xatou(answer);
+ if (picked > count)
+ {
+ log(_("You have chosen number out of range"));
+ continue;
+ }
+
+ break;
+ }
+
+ if (ii == 3)
+ error_msg_and_die(_("Invalid input, porgram exiting..."));
+
+ GList *choosen = g_list_nth(list_options, picked);
+ return xstrdup((char*)choosen->data);
+}
/* Report the crash */
int report(const char *dump_dir_name, int flags)
{
- if (run_analyze_event(dump_dir_name) != 0)
- return 1;
-
/* Load crash_data from (possibly updated by analyze) dump dir */
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
return -1;
crash_data_t *crash_data = create_crash_data_from_dump_dir(dd);
- char *events_as_lines = list_possible_events(dd, NULL, "");
+ char *events_as_lines = list_possible_events(dd, NULL, "analyze");
dd_close(dd);
+ GList *list_events = NULL;
+ if (events_as_lines && *events_as_lines)
+ {
+ char *events = events_as_lines;
+ while (*events)
+ {
+ char *end = strchrnul(events, '\n');
+ char *tmp = xstrndup(events, end - events);
+ list_events = g_list_append(list_events, tmp);
+ events = end;
+ if (!*events)
+ break;
+ events++;
+ }
+
+ char *event = select_event_option(list_events);
+ list_free_with_free(list_events);
+
+ int analyzer_result = run_analyze_event(dump_dir_name, event);
+ free(event);
+
+ if (analyzer_result != 0)
+ return 1;
+ }
+
if (!(flags & CLI_REPORT_BATCH))
{
/* Open text editor and give a chance to review the backtrace etc */
diff --git a/src/cli/report.h b/src/cli/report.h
index 58b8c25..28485d7 100644
--- a/src/cli/report.h
+++ b/src/cli/report.h
@@ -22,7 +22,8 @@
extern "C" {
#endif
-int run_analyze_event(const char *dump_dir_name);
+int run_analyze_event(const char *dump_dir_name, const char *analyzer);
+char *select_event_option(GList *list_options);
/* Report the crash */
enum {
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 5344cdb..7468188 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -65,8 +65,8 @@ $(DESTDIR)/$(DEBUG_INFO_DIR):
$(mkdir_p) '$@'
install-data-hook: $(DESTDIR)/$(DEBUG_INFO_DIR)
- $(LN_S) analyze_RetraceServer.xml $(DESTDIR)$(eventsdir)/reanalyze_RetraceServer.xml
- $(LN_S) analyze_LocalGDB.xml $(DESTDIR)$(eventsdir)/reanalyze_LocalGDB.xml
+ $(LN_S) -f analyze_RetraceServer.xml $(DESTDIR)$(eventsdir)/reanalyze_RetraceServer.xml
+ $(LN_S) -f analyze_LocalGDB.xml $(DESTDIR)$(eventsdir)/reanalyze_LocalGDB.xml
abrt_dump_oops_SOURCES = \
abrt-dump-oops.c
--
1.7.1
13 years, 1 month
ABRT translation process change
by Jiri Moskovcak
Hi,
I'm not sure if everybody noticed that Fedora moved translation to
transifex.net which brought some changes into a translation process. So
to make sure everyone know how to work with it now, here is a quick how to:
1. install transifex-client
2. if you change any strings, add new files, go into "po" dir and run:
$ intltool-update --maintain
- this will tell you which files you should add/remove to/from POTFILES.in
3. in "po" dir run:
$ tx pull
- this will pul the latest translation from the server
$ make update-po
- this will merge the pulled translation with the new/changed strings
$ tx push -s -t
- this will push the updated translations to the server
4. push the updated po files to abrt git.
In case of problem, just ask me (or someone on irc at freenode #transifex)
Thank you,
Jirka
13 years, 1 month
Retrace Server /settings proposal
by Michal Toman
Hi Karel,
here is my proposal for retrace server's settings action:
client -> server
HTTP GET /settings
// no special headers (really? would be available from browsers)
server -> client
packed_size 50
unpacked_size 1024
running 3
max_running 3
formats application/x-tar application/x-gzip application/x-xz-compressed-tar
// text/plain, in general each row contains <setting_name><space><value(s)>
What other settings do we want to show?
Thanks,
Michal
13 years, 1 month
[PATCH] made kernel oopses world readable
by Jiri Moskovcak
This patch adds an option '-x' to abrt-dump-oops which makes the created
dumpdir and it's content readable by all. The old kerneloops application
also informed all users about the oops. The patch for applet will follow
once this is accepted.
Please review,
J.
13 years, 1 month