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

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