Blame SOURCES/0287-a-a-ureport-add-check-if-crash-is-from-packaged-exec.patch

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