<?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>13267</bug_id>
          
          <creation_ts>2019-04-05 15:12:11 +0000</creation_ts>
          <short_desc>bitbake Python (double) exception</short_desc>
          <delta_ts>2019-08-20 03:34:28 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</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.8 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <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>83462</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2019-04-05 15:12:11 +0000</bug_when>
    <thetext>My HOSTTOOLS were missing &quot;chrpath&quot;, so an error message was expected. However, not like this:


ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/home/juro/yocto/poky/build2-repro-minimal-x86_64-2019-04-04/bitbake-cookerdaemon.log):
--- Starting bitbake server pid 14471 at 2019-04-04 10:42:45.831093 ---
Traceback (most recent call last):
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/cookerdata.py&quot;, line 290, in parseBaseConfiguration
    bb.event.fire(bb.event.ConfigParsed(), self.data)
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/event.py&quot;, line 225, in fire
    fire_class_handlers(event, d)
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/event.py&quot;, line 134, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/event.py&quot;, line 106, in execute_handler
    ret = handler(event)
  File &quot;/home/juro/yocto/poky/meta/classes/base.bbclass&quot;, line 238, in base_eventhandler
    setup_hosttools_dir(d.getVar(&apos;HOSTTOOLS_DIR&apos;), &apos;HOSTTOOLS&apos;, d)
  File &quot;/home/juro/yocto/poky/meta/classes/base.bbclass&quot;, line 142, in setup_hosttools_dir
    bb.fatal(&quot;The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n  %s&quot; % &quot; &quot;.join(notfound))
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/__init__.py&quot;, line 120, in fatal
    raise BBHandledException()
bb.BBHandledException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/daemonize.py&quot;, line 83, in createDaemon
    function()
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/server/process.py&quot;, line 469, in _startServer
    self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/cooker.py&quot;, line 210, in __init__
    self.initConfigurationData()
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/cooker.py&quot;, line 375, in initConfigurationData
    self.databuilder.parseBaseConfiguration()
  File &quot;/home/juro/yocto/poky/bitbake/lib/bb/cookerdata.py&quot;, line 317, in parseBaseConfiguration
    raise bb.BBHandledException
bb.BBHandledException
ERROR: The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:
  chrpath</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83666</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2019-04-29 08:28:18 +0000</bug_when>
    <thetext>Hi RP,

I think that double exceptions are acceptable unless it loses error message? For this case, the error message is kept. What&apos;s your opinion, please ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83675</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-05-01 07:09:40 +0000</bug_when>
    <thetext>The double exception is confusing to the user. The system printed a real error so it shouldn&apos;t be printing an exception at all in this case. One of the points of bb.BBHandledException is to avoid tracebacks as there should have been a usable error shown to the user already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84713</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2019-08-20 03:34:28 +0000</bug_when>
    <thetext>Merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2cb6a75b5ad54fb4224a41a65a4f2bcc902f5b94</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>