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

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