doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

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

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