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

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