Blame SOURCES/0265-cli-configure-libreport-to-ignore-not-reportable.patch

baab13
From 3173508eef0b8b14020c9bef5bacb36feae83f4b Mon Sep 17 00:00:00 2001
baab13
From: Jakub Filak <jfilak@redhat.com>
baab13
Date: Wed, 23 Nov 2016 16:03:51 +0100
baab13
Subject: [PATCH] cli: configure libreport to ignore not-reportable
baab13
baab13
The check for not-reportable is performed by libreport too.
baab13
baab13
Related to #1257159
baab13
Related to abrt/abrt#1166
baab13
baab13
Signed-off-by: Jakub Filak <jfilak@redhat.com>
baab13
---
baab13
 src/cli/report.c | 10 +++++++---
baab13
 1 file changed, 7 insertions(+), 3 deletions(-)
baab13
baab13
diff --git a/src/cli/report.c b/src/cli/report.c
baab13
index 1e9067b..efdca2d 100644
baab13
--- a/src/cli/report.c
baab13
+++ b/src/cli/report.c
baab13
@@ -36,6 +36,7 @@ int _cmd_report(const char **dirs_strv, int flags)
baab13
             continue;
baab13
         }
baab13
 
baab13
+
baab13
         const int not_reportable = test_exist_over_dbus(real_problem_id, FILENAME_NOT_REPORTABLE);
baab13
         if (not_reportable != 0)
baab13
         {
baab13
@@ -57,9 +58,12 @@ int _cmd_report(const char **dirs_strv, int flags)
baab13
             ++ret;
baab13
             continue;
baab13
         }
baab13
-        int status = report_problem_in_dir(real_problem_id,
baab13
-                                             LIBREPORT_WAIT
baab13
-                                           | LIBREPORT_RUN_CLI);
baab13
+
baab13
+        int lr_flags = LIBREPORT_WAIT | LIBREPORT_RUN_CLI;
baab13
+        if (flags & CMD_REPORT_UNSAFE)
baab13
+            lr_flags |= LIBREPORT_IGNORE_NOT_REPORTABLE;
baab13
+
baab13
+        int status = report_problem_in_dir(real_problem_id, lr_flags);
baab13
 
baab13
         /* the problem was successfully reported and option is -d */
baab13
         if((flags & CMD_REPORT_REMOVE) && (status == 0 || status == EXIT_STOP_EVENT_RUN))
baab13
-- 
baab13
1.8.3.1
baab13