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