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

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