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

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