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