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

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