doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

Blame SOURCES/1005-cli-list-revert-patch-7966e5737e8d3af43b1ecdd6a82323.patch

cf6f37
From 035f7e2280686b563709e663d2cd3c42647ef25c Mon Sep 17 00:00:00 2001
cf6f37
From: Matej Habrnal <mhabrnal@redhat.com>
cf6f37
Date: Mon, 30 Nov 2015 17:13:43 +0100
cf6f37
Subject: [PATCH 1005/1006] cli list: revert patch
cf6f37
 '7966e5737e8d3af43b1ecdd6a823234b8d25931d'
cf6f37
cf6f37
This patch cannot be in CentOS7 because is related only to RHEL.
cf6f37
cf6f37
Removing the patch here because previous patches depends on this patch and
cf6f37
cannot be applied without conflict.
cf6f37
cf6f37
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
cf6f37
---
cf6f37
 configure.ac        |  2 --
cf6f37
 src/cli/Makefile.am |  3 +--
cf6f37
 src/cli/list.c      | 49 -------------------------------------------------
cf6f37
 3 files changed, 1 insertion(+), 53 deletions(-)
cf6f37
cf6f37
diff --git a/configure.ac b/configure.ac
cf6f37
index 02d7e0e..9481b7f 100644
cf6f37
--- a/configure.ac
cf6f37
+++ b/configure.ac
cf6f37
@@ -139,7 +139,6 @@ PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins'
cf6f37
 DEFAULT_PLUGINS_CONF_DIR='${datadir}/${PACKAGE_NAME}/conf.d/plugins'
cf6f37
 EVENTS_DIR='${datadir}/libreport/events'
cf6f37
 EVENTS_CONF_DIR='${sysconfdir}/libreport/events.d'
cf6f37
-WORKFLOWS_DIR='${datadir}/libreport/workflows'
cf6f37
 ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1'
cf6f37
 DEFAULT_DUMP_DIR_MODE=$($PKG_CONFIG --variable=dd_mode libreport)
cf6f37
 LIBREPORT_PLUGINS_CONF_DIR=$($PKG_CONFIG --variable=plugins_conf_dir libreport)
cf6f37
@@ -252,7 +251,6 @@ AC_SUBST(VAR_RUN)
cf6f37
 AC_SUBST(PLUGINS_CONF_DIR)
cf6f37
 AC_SUBST(DEFAULT_PLUGINS_CONF_DIR)
cf6f37
 AC_SUBST(EVENTS_CONF_DIR)
cf6f37
-AC_SUBST(WORKFLOWS_DIR)
cf6f37
 AC_SUBST(EVENTS_DIR)
cf6f37
 AC_SUBST(DEFAULT_DUMP_LOCATION)
cf6f37
 AC_SUBST(DEFAULT_DUMP_DIR_MODE)
cf6f37
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
cf6f37
index a7c76ef..92dc20a 100644
cf6f37
--- a/src/cli/Makefile.am
cf6f37
+++ b/src/cli/Makefile.am
cf6f37
@@ -17,8 +17,7 @@ abrt_cli_CFLAGS = \
cf6f37
 	-I$(srcdir)/../include \
cf6f37
 	-I$(srcdir)/../lib \
cf6f37
 	$(LIBREPORT_CFLAGS) \
cf6f37
-	$(POLKIT_AGENT_CFLAGS) \
cf6f37
-	-DWORKFLOWS_DIR=\"${WORKFLOWS_DIR}\"
cf6f37
+	$(POLKIT_AGENT_CFLAGS)
cf6f37
 
cf6f37
 if SUGGEST_AUTOREPORTING
cf6f37
 abrt_cli_CFLAGS += -DSUGGEST_AUTOREPORTING=1
cf6f37
diff --git a/src/cli/list.c b/src/cli/list.c
cf6f37
index e688d2f..d069695 100644
cf6f37
--- a/src/cli/list.c
cf6f37
+++ b/src/cli/list.c
cf6f37
@@ -77,55 +77,6 @@ static void print_crash(problem_data_t *problem_data, int detailed, int text_siz
cf6f37
                             /*names_to_skip:*/ NULL,
cf6f37
                             /*max_text_size:*/ text_size,
cf6f37
                             MAKEDESC_SHOW_ONLY_LIST | MAKEDESC_SHOW_URLS);
cf6f37
-
cf6f37
-        /*
cf6f37
-         * If the problem is reportable and has not yet been reported into RHTS
cf6f37
-         * and there is at least one applicable Workflow which contains
cf6f37
-         * 'report_RHTSupport' event, then append a short message informing
cf6f37
-         * user that he can create a new case in Red Hat Customer Portal.
cf6f37
-         */
cf6f37
-        const char *const not_reportable =  problem_data_get_content_or_NULL(problem_data, FILENAME_NOT_REPORTABLE);
cf6f37
-        const char *const reported_to    =  not_reportable            ? NULL : problem_data_get_content_or_NULL(problem_data, FILENAME_REPORTED_TO);
cf6f37
-        report_result_t *const report    = !reported_to               ? NULL : find_in_reported_to_data(reported_to, "RHTSupport");
cf6f37
-
cf6f37
-        if (!not_reportable && !report)
cf6f37
-        {
cf6f37
-            /* The lines below should be replaced by something simpler, I'd
cf6f37
-             * like to see:
cf6f37
-             * GHashTable *possible_worfklows = load_applicable_workflows_for_dump();
cf6f37
-             *
cf6f37
-             * However, this feature (rhbz#1055565) is intended for RHEL only
cf6f37
-             * and I'm not sure whether it's worth to file another bug against
cf6f37
-             * libreport and try to improve libreport public API.
cf6f37
-             */
cf6f37
-            const char *const dump_dir_name = problem_data_get_content_or_NULL(problem_data, CD_DUMPDIR);
cf6f37
-            GList *const wf_names = list_possible_events_problem_data_glist(problem_data, dump_dir_name, "workflow");
cf6f37
-            GHashTable *const possible_workflows = load_workflow_config_data_from_list(wf_names, WORKFLOWS_DIR);
cf6f37
-            g_list_free_full(wf_names, free);
cf6f37
-
cf6f37
-            int event_found = 0;
cf6f37
-
cf6f37
-            GHashTableIter iter;
cf6f37
-            gpointer key = NULL;
cf6f37
-            gpointer value = NULL;
cf6f37
-
cf6f37
-            g_hash_table_iter_init(&iter, possible_workflows);
cf6f37
-            while (!event_found && g_hash_table_iter_next(&iter, &key, &value))
cf6f37
-            {
cf6f37
-                GList *const event_names = wf_get_event_names((workflow_t *)value);
cf6f37
-                event_found = !!g_list_find_custom(event_names, "report_RHTSupport", (GCompareFunc)g_strcmp0);
cf6f37
-                g_list_free_full(event_names, free);
cf6f37
-            }
cf6f37
-
cf6f37
-            g_hash_table_destroy(possible_workflows);
cf6f37
-
cf6f37
-            if (event_found)
cf6f37
-            {
cf6f37
-                char *tmp = xasprintf(_("%sRun 'abrt-cli report %s' for creating a case in Red Hat Customer Portal\n"), desc, dump_dir_name);
cf6f37
-                free(desc);
cf6f37
-                desc = tmp;
cf6f37
-            }
cf6f37
-        }
cf6f37
     }
cf6f37
     fputs(desc, stdout);
cf6f37
     free(desc);
cf6f37
-- 
cf6f37
1.8.3.1
cf6f37