doczkal / rpms / abrt

Forked from rpms/abrt 4 years ago
Clone

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

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