diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-16 23:23:38 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-16 23:24:04 +0200 |
commit | c91d721a4a7fb52e3763d34a8956138f7f2f9591 (patch) | |
tree | 29fc89bb5bb47cf66f614267358e09fd798309d2 | |
parent | 79085fda802056f096b61a526e95e08136faf95d (diff) | |
download | abrt-c91d721a4a7fb52e3763d34a8956138f7f2f9591.tar.gz abrt-c91d721a4a7fb52e3763d34a8956138f7f2f9591.tar.xz abrt-c91d721a4a7fb52e3763d34a8956138f7f2f9591.zip |
remove abrt-handle-crashdump: abrt-cli now has all its features. closes 244
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | abrt.spec.in | 1 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | po/abrt.pot | 19 | ||||
-rw-r--r-- | src/cli/Makefile.am | 21 | ||||
-rw-r--r-- | src/cli/abrt-handle-crashdump.c | 99 | ||||
-rw-r--r-- | src/report-python/__init__.py | 5 |
7 files changed, 2 insertions, 145 deletions
@@ -33,7 +33,6 @@ src/gui-gtk/abrt-gui src/applet/abrt-applet src/cli/abrt-cli -src/cli/abrt-handle-crashdump src/hooks/abrt_exception_handler.py src/hooks/abrt-hook-ccpp diff --git a/abrt.spec.in b/abrt.spec.in index b68a13c7..49168082 100644 --- a/abrt.spec.in +++ b/abrt.spec.in @@ -427,7 +427,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_sbindir}/abrtd %{_sbindir}/abrt-server %{_bindir}/abrt-handle-upload -%{_bindir}/abrt-handle-crashdump %{_bindir}/abrt-action-save-package-data %{_bindir}/abrt-retrace-client %config(noreplace) %{_sysconfdir}/%{name}/abrt.conf diff --git a/po/POTFILES.in b/po/POTFILES.in index 4dfeb17a..a19aac2d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -6,7 +6,6 @@ src/applet/applet.c src/applet/applet_gtk.c src/cli/cli.c src/cli/report.c -src/cli/abrt-handle-crashdump.c src/daemon/abrt-action-save-package-data.c src/daemon/abrt-server.c src/daemon/abrtd.c diff --git a/po/abrt.pot b/po/abrt.pot index 9a0aa9d7..531bbcee 100644 --- a/po/abrt.pot +++ b/po/abrt.pot @@ -242,7 +242,6 @@ msgid "" msgstr "" #: ../src/daemon/abrt-action-save-package-data.c:265 -#: ../src/daemon/abrt-handle-crashdump.c:61 #: ../src/plugins/abrt-action-analyze-backtrace.c:70 #: ../src/plugins/abrt-action-analyze-c.c:177 #: ../src/plugins/abrt-action-analyze-oops.c:159 @@ -257,26 +256,12 @@ msgstr "" msgid "Dump directory" msgstr "" -#: ../src/daemon/abrt-handle-crashdump.c:43 -msgid "" -" [-vs] -d DIR -e EVENT\n" -" or: " -msgstr "" - -#: ../src/daemon/abrt-handle-crashdump.c:60 ../src/daemon/abrt-server.c:301 +#: ../src/daemon/abrt-server.c:301 #: ../src/plugins/abrt-dump-oops.c:585 msgid "Log to syslog" msgstr "" -#: ../src/daemon/abrt-handle-crashdump.c:62 -msgid "Handle EVENT" -msgstr "" - -#: ../src/daemon/abrt-handle-crashdump.c:63 -msgid "List possible events [which start with PFX]" -msgstr "" - -#: ../src/daemon/abrt-handle-crashdump.c:64 ../src/daemon/abrt-server.c:302 +#: ../src/daemon/abrt-server.c:302 #: ../src/daemon/abrtd.c:525 ../src/gui-gtk/main.c:228 #: ../src/gui-wizard-gtk/main.c:94 msgid "Add program names to log" diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index 2157445e..cd973281 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -1,7 +1,6 @@ -include ../../config.mak bin_PROGRAMS = \ - abrt-handle-crashdump \ abrt-cli abrt_cli_SOURCES = \ @@ -23,26 +22,6 @@ abrt_cli_LDADD = \ ../lib/libabrt_dbus.la \ $(GLIB_LIBS) -abrt_handle_crashdump_SOURCES = \ - abrt-handle-crashdump.c -abrt_handle_crashdump_CPPFLAGS = \ - -I$(srcdir)/../include/report -I$(srcdir)/../include \ - -I$(srcdir)/../lib \ - -DBIN_DIR=\"$(bindir)\" \ - -DVAR_RUN=\"$(VAR_RUN)\" \ - -DCONF_DIR=\"$(CONF_DIR)\" \ - -DLOCALSTATEDIR='"$(localstatedir)"' \ - -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \ - -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \ - -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \ - -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \ - -DLIBEXEC_DIR=\"$(LIBEXEC_DIR)\" \ - $(GLIB_CFLAGS) \ - -D_GNU_SOURCE \ - -Wall -Wwrite-strings -Werror -abrt_handle_crashdump_LDADD = \ - ../lib/libreport.la - MAN_TXT = \ abrt-cli.txt diff --git a/src/cli/abrt-handle-crashdump.c b/src/cli/abrt-handle-crashdump.c deleted file mode 100644 index d04e4fef..00000000 --- a/src/cli/abrt-handle-crashdump.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2010 ABRT team - Copyright (C) 2010 RedHat inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#include "abrtlib.h" -#include "parse_options.h" - -static const char *dump_dir_name = NULL; -//static const char *conf_filename = CONF_DIR"/abrt_event.conf"; -static const char *event; -static const char *pfx = ""; - -static char *do_log(char *log_line, void *param) -{ - log("%s", log_line); - return log_line; -} - -int main(int argc, char **argv) -{ - abrt_init(argv); - - /* Can't keep these strings/structs static: _() doesn't support that */ - const char *program_usage_string = _( - "\b [-vs]" /*" [-c CONFFILE]"*/ " -d DIR -e EVENT\n" - " or: \b [-vs]" /*" [-c CONFFILE]"*/ " [-d DIR] -l[PFX]\n" - "\n" - "Handles dump directory DIR according to rules in abrt_event.conf" - ); - enum { - OPT_v = 1 << 0, - OPT_s = 1 << 1, - OPT_d = 1 << 2, - OPT_e = 1 << 3, - OPT_l = 1 << 4, - OPT_p = 1 << 5, -// OPT_c = 1 << ?, - }; - /* Keep enum above and order of options below in sync! */ - struct options program_options[] = { - OPT__VERBOSE(&g_verbose), - OPT_BOOL( 's', NULL, NULL , _("Log to syslog" )), - OPT_STRING( 'd', NULL, &dump_dir_name, "DIR" , _("Dump directory")), - OPT_STRING( 'e', NULL, &event , "EVENT" , _("Handle EVENT" )), - OPT_OPTSTRING('l', NULL, &pfx , "PFX" , _("List possible events [which start with PFX]")), - OPT_BOOL( 'p', NULL, NULL , _("Add program names to log")), -// OPT_STRING( 'c', NULL, &conf_filename, "CONFFILE", _("Configuration file" )), - OPT_END() - }; - unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); - if (!(opts & (OPT_e|OPT_l))) - show_usage_and_die(program_usage_string, program_options); - - export_abrt_envvars(opts & OPT_p); - - if (opts & OPT_s) - { - openlog(msg_prefix, 0, LOG_DAEMON); - logmode = LOGMODE_SYSLOG; - } - - if (opts & OPT_l) - { - /* Note that dump_dir_name may be NULL here, it means "show all - * possible events regardless of dir" - */ - char *events = list_possible_events(NULL, dump_dir_name, pfx); - if (!events) - return 1; /* error msg is already logged */ - fputs(events, stdout); - free(events); - return 0; - } - - /* -e EVENT: run event */ - - struct run_event_state *run_state = new_run_event_state(); - run_state->logging_callback = do_log; - int r = run_event_on_dir_name(run_state, dump_dir_name ? dump_dir_name : ".", event); - if (r == 0 && run_state->children_count == 0) - error_msg_and_die("No actions are found for event '%s'", event); - free_run_event_state(run_state); - - return r; -} diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py index 1e87dc47..3e55ea38 100644 --- a/src/report-python/__init__.py +++ b/src/report-python/__init__.py @@ -119,11 +119,6 @@ def createAlertSignature(component, hashmarkername, hashvalue, summary, alertSig return cd def report(cd, io_unused): - #dd = cd.create_dump_dir() - #dir_name = dd.name - #dd.close() - #r = os.spawnlp(P_WAIT, "abrt-handle-crashdump", "abrt-handle-crashdump", "-d", dirname, "-e" , "report"); - ### Silmpler alternative: state = run_event_state() #state.logging_callback = logfunc r = state.run_event_on_problem_data(cd, "report") |