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