]> code.ossystems Code Review - openembedded-core.git/commitdiff
report-error: provide distro identifier string in case of uninative build
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Thu, 17 Aug 2017 18:00:36 +0000 (11:00 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Aug 2017 11:35:56 +0000 (12:35 +0100)
Besides providing the NATIVELSBSTRING, include distro info when creating
the (json) error report. This information provides better info than the
standard 'universal*' string for uninative builds.

[YOCTO #11824]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/report-error.bbclass

index d6fdd364ad91314392837d067ccc379f9a52926e..1c55abfbf348a306084b77957d7928d60f203b40 100644 (file)
@@ -29,6 +29,13 @@ python errorreport_handler () {
         import json
         import codecs
 
+        def nativelsb():
+            nativelsbstr = e.data.getVar("NATIVELSBSTRING")
+            # provide a bit more host info in case of uninative build
+            if e.data.getVar('UNINATIVE_URL') != 'unset':
+                return '/'.join([nativelsbstr, lsb_distro_identifier(e.data)])
+            return nativelsbstr
+
         logpath = e.data.getVar('ERR_REPORT_DIR')
         datafile = os.path.join(logpath, "error-report.txt")
 
@@ -38,7 +45,7 @@ python errorreport_handler () {
             machine = e.data.getVar("MACHINE")
             data['machine'] = machine
             data['build_sys'] = e.data.getVar("BUILD_SYS")
-            data['nativelsb'] = e.data.getVar("NATIVELSBSTRING")
+            data['nativelsb'] = nativelsb()
             data['distro'] = e.data.getVar("DISTRO")
             data['target_sys'] = e.data.getVar("TARGET_SYS")
             data['failures'] = []