<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9291</bug_id>
          
          <creation_ts>2016-03-17 15:49:16 +0000</creation_ts>
          <short_desc>sanity.bbclass: error reporting too verbose</short_desc>
          <delta_ts>2016-03-31 08:16:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>configuration</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>60093</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-03-17 15:49:16 +0000</bug_when>
    <thetext>When checks like the one in oecore_update_bblayers() fail, the resulting error output contains useless stack backtraces that make it hard to find the actual error message. The stack backtraces should be avoided.

Example:

ERROR: Error executing a python function in exec_python_func() autogenerated:
 
The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:oecore_update_bblayers(d)
     0003:
File: &apos;/work/ostro-os/meta/classes/sanity.bbclass&apos;, lineno: 166, function: oecore_update_bblayers
     0162:        current_lconf += 1
     0163:        sanity_conf_update(bblayers_fn, lines, &apos;LCONF_VERSION&apos;, current_lconf)
     0164:        return
     0165:
 *** 0166:    raise NotImplementedError(failmsg)
     0167:}
     0168:
     0169:def raise_sanity_error(msg, d, network_error=False):
     0170:    if d.getVar(&quot;SANITY_USE_EVENTS&quot;, True) == &quot;1&quot;:
Exception: NotImplementedError: Your version of bblayers.conf has the wrong LCONF_VERSION (has 7, expecting 8).
Please compare your file against bblayers.conf.sample and merge any changes before continuing.
&quot;meld conf/bblayers.conf /work/ostro-os/meta-ostro/conf/bblayers.conf.sample&quot;
 
is a good way to visualise the changes.
 
ERROR: Execution of event handler &apos;check_sanity_eventhandler&apos; failed
Traceback (most recent call last):
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 954, in check_sanity(sanity_data=&lt;bb.data_smart.DataSmart object at 0x7f77ae6da510&gt;):
     
    &gt;    check_sanity_everybuild(status, sanity_data)
         
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 780, in check_sanity_everybuild(status=&lt;SanityStatus object at 0x7f77ae6da5d0&gt;, d=&lt;bb.data_smart.DataSmart object at 0x7f77ae6da510&gt;):
     
    &gt;    sanity_check_conffiles(status, d)
     
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 560, in sanity_check_conffiles(status=&lt;SanityStatus object at 0x7f77ae6da5d0&gt;, d=&lt;bb.data_smart.DataSmart object at 0x7f77ae6da510&gt;):
                 try:
    &gt;                bb.build.exec_func(func, d)
                 except NotImplementedError as e:
  File &quot;/work/ostro-os/bitbake/lib/bb/build.py&quot;, line 227, in exec_func(func=&apos;oecore_update_bblayers&apos;, d=&lt;bb.data_smart.DataSmart object at 0x7f77ae6da510&gt;, dirs=None):
             if ispython:
    &gt;            exec_func_python(func, d, runfile, cwd=adir)
             else:
  File &quot;/work/ostro-os/bitbake/lib/bb/build.py&quot;, line 263, in exec_func_python(func=&apos;oecore_update_bblayers&apos;, d=&lt;bb.data_smart.DataSmart object at 0x7f77ae6da510&gt;, runfile=&apos;/fast/build/ostro/intel-corei7-64/tmp-glibc/work/corei7-64-ostro-linux/defaultpkgname/1.0-r0/temp/run.oecore_update_bblayers.17604&apos;, cwd=&apos;/fast/build/ostro/intel-corei7-64/tmp-glibc/work/corei7-64-ostro-linux/defaultpkgname/1.0-r0/defaultpkgname-1.0&apos;):
         except:
    &gt;        raise FuncFailed(func, None)
         finally:
FuncFailed: Function failed: oecore_update_bblayers
 
ERROR: Command execution failed: Traceback (most recent call last):
  File &quot;/work/ostro-os/bitbake/lib/bb/command.py&quot;, line 101, in runAsyncCommand
    self.cooker.updateCache()
  File &quot;/work/ostro-os/bitbake/lib/bb/cooker.py&quot;, line 1538, in updateCache
    bb.event.fire(bb.event.SanityCheck(False), self.data)
  File &quot;/work/ostro-os/bitbake/lib/bb/event.py&quot;, line 171, in fire
    fire_class_handlers(event, d)
  File &quot;/work/ostro-os/bitbake/lib/bb/event.py&quot;, line 110, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File &quot;/work/ostro-os/bitbake/lib/bb/event.py&quot;, line 82, in execute_handler
    ret = handler(event)
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 991, in check_sanity_eventhandler
    reparse = check_sanity(sanity_data)
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 954, in check_sanity
    check_sanity_everybuild(status, sanity_data)
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 780, in check_sanity_everybuild
    sanity_check_conffiles(status, d)
  File &quot;/work/ostro-os/meta/classes/sanity.bbclass&quot;, line 560, in sanity_check_conffiles
    bb.build.exec_func(func, d)
  File &quot;/work/ostro-os/bitbake/lib/bb/build.py&quot;, line 227, in exec_func
    exec_func_python(func, d, runfile, cwd=adir)
  File &quot;/work/ostro-os/bitbake/lib/bb/build.py&quot;, line 263, in exec_func_python
    raise FuncFailed(func, None)
FuncFailed: Function failed: oecore_update_bblayers
 
 
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60566</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-03-31 08:16:07 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2123a7ef280c23f80bb6ffa9e023a3fc8f3de864</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>