Blame SOURCES/0266-cli-print-out-the-not-reportable-reason.patch
|
|
06486d |
From 9ec8e5c529b06ccbd1e1c4888118fd278ef4393b Mon Sep 17 00:00:00 2001
|
|
|
06486d |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
06486d |
Date: Thu, 24 Nov 2016 09:06:09 +0100
|
|
|
06486d |
Subject: [PATCH] cli: print out the not-reportable reason
|
|
|
06486d |
|
|
|
06486d |
But only in verbose mode. Users might be wondering why the problem is
|
|
|
06486d |
not reportable. Users will intuitively try to run the command in verbose
|
|
|
06486d |
mode to find out why the problem is not reportable.
|
|
|
06486d |
|
|
|
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, 8 insertions(+), 1 deletion(-)
|
|
|
06486d |
|
|
|
06486d |
diff --git a/src/cli/report.c b/src/cli/report.c
|
|
|
06486d |
index efdca2d..a76923f 100644
|
|
|
06486d |
--- a/src/cli/report.c
|
|
|
06486d |
+++ b/src/cli/report.c
|
|
|
06486d |
@@ -36,12 +36,19 @@ int _cmd_report(const char **dirs_strv, int flags)
|
|
|
06486d |
continue;
|
|
|
06486d |
}
|
|
|
06486d |
|
|
|
06486d |
-
|
|
|
06486d |
const int not_reportable = test_exist_over_dbus(real_problem_id, FILENAME_NOT_REPORTABLE);
|
|
|
06486d |
if (not_reportable != 0)
|
|
|
06486d |
{
|
|
|
06486d |
if (!(flags & CMD_REPORT_UNSAFE))
|
|
|
06486d |
{
|
|
|
06486d |
+ if (g_verbose > 0)
|
|
|
06486d |
+ {
|
|
|
06486d |
+ char *reason = load_text_over_dbus(real_problem_id, FILENAME_NOT_REPORTABLE);
|
|
|
06486d |
+ if (reason != NULL)
|
|
|
06486d |
+ log("%s\n", reason);
|
|
|
06486d |
+ free(reason);
|
|
|
06486d |
+ }
|
|
|
06486d |
+
|
|
|
06486d |
error_msg(_("Problem '%s' cannot be reported"), real_problem_id);
|
|
|
06486d |
free(real_problem_id);
|
|
|
06486d |
++ret;
|
|
|
06486d |
--
|
|
|
06486d |
1.8.3.1
|
|
|
06486d |
|