Blame SOURCES/0263-cli-don-t-start-reporting-of-not-reportable-problems.patch

baab13
From 726eaedf70802680a3634b572603b39422016c80 Mon Sep 17 00:00:00 2001
baab13
From: Jakub Filak <jfilak@redhat.com>
baab13
Date: Thu, 20 Aug 2015 11:15:59 +0200
baab13
Subject: [PATCH] cli: don't start reporting of not-reportable problems
baab13
baab13
If the reported problem data contains 'not-reportable' element, the
baab13
reporting process fails unexpectedly and after the reporter already spent some
baab13
time on it.
baab13
baab13
This commit ensures that the reporting process won't start, so
baab13
abrt-cli's behaviour will be consistent with ABRT GUI.
baab13
baab13
However, this is not an ideal solution because we might want to allow
baab13
the reporter to report the problem directly to developers via e-mail.
baab13
baab13
Closes #986
baab13
Related to #1257159
baab13
baab13
Signed-off-by: Jakub Filak <jfilak@redhat.com>
baab13
---
baab13
 src/cli/report.c | 9 +++++++++
baab13
 1 file changed, 9 insertions(+)
baab13
baab13
diff --git a/src/cli/report.c b/src/cli/report.c
baab13
index 19b4c51..cc4035e 100644
baab13
--- a/src/cli/report.c
baab13
+++ b/src/cli/report.c
baab13
@@ -36,6 +36,15 @@ int _cmd_report(const char **dirs_strv, int remove)
baab13
             continue;
baab13
         }
baab13
 
baab13
+        const int not_reportable = test_exist_over_dbus(real_problem_id, FILENAME_NOT_REPORTABLE);
baab13
+        if (not_reportable != 0)
baab13
+        {
baab13
+            error_msg(_("Problem '%s' cannot be reported"), real_problem_id);
baab13
+            free(real_problem_id);
baab13
+            ++ret;
baab13
+            continue;
baab13
+        }
baab13
+
baab13
         const int res = chown_dir_over_dbus(real_problem_id);
baab13
         if (res != 0)
baab13
         {
baab13
-- 
baab13
1.8.3.1
baab13