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