|
|
a60cd7 |
From 9971c9376e59f1b74c7e5844a732ea5cee996599 Mon Sep 17 00:00:00 2001
|
|
|
a60cd7 |
From: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
a60cd7 |
Date: Tue, 10 Oct 2017 11:31:09 +0200
|
|
|
a60cd7 |
Subject: [PATCH] a-a-ureport: add check if crash is from packaged executable
|
|
|
a60cd7 |
|
|
|
a60cd7 |
uReport cannot be created for unpackaged executable.
|
|
|
a60cd7 |
This commit adds check if the problem is packaged. If not
|
|
|
a60cd7 |
uReport creating ends with log message explaining it.
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Resolves #1319828
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
a60cd7 |
---
|
|
|
a60cd7 |
src/plugins/abrt-action-ureport | 5 +++++
|
|
|
a60cd7 |
1 file changed, 5 insertions(+)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
diff --git a/src/plugins/abrt-action-ureport b/src/plugins/abrt-action-ureport
|
|
|
a60cd7 |
index 48bebef..2616b03 100755
|
|
|
a60cd7 |
--- a/src/plugins/abrt-action-ureport
|
|
|
a60cd7 |
+++ b/src/plugins/abrt-action-ureport
|
|
|
a60cd7 |
@@ -118,6 +118,7 @@ if __name__ == "__main__":
|
|
|
a60cd7 |
report_type = dd.load_text("analyzer", 0)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
core_backtrace_exists = dd.exist("core_backtrace")
|
|
|
a60cd7 |
+ packaged = dd.exist("package")
|
|
|
a60cd7 |
reported_to = dd.load_text("reported_to", DD_FAIL_QUIETLY_ENOENT)
|
|
|
a60cd7 |
ureports_counter = try_parse_number(dd, "ureports_counter")
|
|
|
a60cd7 |
count = try_parse_number(dd, "count")
|
|
|
a60cd7 |
@@ -154,6 +155,10 @@ if __name__ == "__main__":
|
|
|
a60cd7 |
log1("uReport can't be sent without core_backtrace. Exiting.")
|
|
|
a60cd7 |
sys.exit(1)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
+ if not packaged:
|
|
|
a60cd7 |
+ log(_("Problem comes from unpackaged executable. Unable to create uReport."))
|
|
|
a60cd7 |
+ sys.exit(1)
|
|
|
a60cd7 |
+
|
|
|
a60cd7 |
exitcode = spawn_and_wait("reporter-ureport")
|
|
|
a60cd7 |
if exitcode == 0 or exitcode == 70:
|
|
|
a60cd7 |
dd = dd_opendir(dirname, 0)
|
|
|
a60cd7 |
--
|
|
|
a60cd7 |
1.8.3.1
|
|
|
a60cd7 |
|