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

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