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

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