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