<?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>11212</bug_id>
          
          <creation_ts>2017-03-22 15:14:14 +0000</creation_ts>
          <short_desc>bitbake-layers throws a non-obvious error if a layer&apos;s dependencies are missing</short_desc>
          <delta_ts>2017-04-11 16:48:10 +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>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bruce Ashfield">bruce.ashfield</reporter>
          <assigned_to name="Stephano Cetola">stephano</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71576</commentid>
    <comment_count>0</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-03-22 15:14:14 +0000</bug_when>
    <thetext>If you don&apos;t add layers in the right order, you get a parse error stack
trace.

Nothing wrong with the trace .. it just doesn&apos;t tell you what the error
is and how to fix it.

I had to mess around for quite a while until I realized it was missing
dependencies.

i.e.:

bruce@yow-dellw-ag:~/overc/build$ bitbake-layers add-layer ../meta-openembedded/meta-networking/
bruce@yow-dellw-ag:~/overc/build$ bitbake-layers add-layer ../meta-openembedded/meta-filesystems/
Traceback (most recent call last):
  File &quot;/home/bruce/overc/poky/bitbake/bin/bitbake-layers&quot;, line 115, in &lt;module&gt;
    ret = main()
  File &quot;/home/bruce/overc/poky/bitbake/bin/bitbake-layers&quot;, line 83, in main
    tinfoil.prepare(True)
  File &quot;/home/bruce/overc/poky/bitbake/lib/bb/tinfoil.py&quot;, line 262, in prepare
    self.run_command(&apos;parseConfiguration&apos;)
  File &quot;/home/bruce/overc/poky/bitbake/lib/bb/tinfoil.py&quot;, line 312, in run_command
    raise TinfoilCommandFailed(result[1])
bb.tinfoil.TinfoilCommandFailed: Traceback (most recent call last):
  File &quot;/home/bruce/overc/poky/bitbake/lib/bb/command.py&quot;, line 81, in runCommand
    result = command_method(self, commandline)
  File &quot;/home/bruce/overc/poky/bitbake/lib/bb/command.py&quot;, line 315, in parseConfiguration
    command.cooker.parseConfiguration()
  File &quot;/home/bruce/overc/poky/bitbake/lib/bb/cooker.py&quot;, line 541, in parseConfiguration
    self.handleCollections(self.data.getVar(&quot;BBFILE_COLLECTIONS&quot;))
  File &quot;/home/bruce/overc/poky/bitbake/lib/bb/cooker.py&quot;, line 1303, in handleCollections
    raise CollectionError(&quot;Errors during parsing layer configuration&quot;)
bb.cooker.CollectionError: Errors during parsing layer configuration</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72250</commentid>
    <comment_count>1</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-04-10 20:41:48 +0000</bug_when>
    <thetext>You should have seen an error from the Bitbake.Parsing log before the stacktrace:

$ bitbake-layers add-layer ../meta-networking/
$ bitbake-layers add-layer ../meta-filesystems/
ERROR: Layer &apos;networking-layer&apos; depends on layer &apos;meta-python&apos;, but this layer is not enabled in your configuration
ERROR: Layer &apos;networking-layer&apos; depends on layer &apos;openembedded-layer&apos;, but this layer is not enabled in your configuration
ERROR: Layer &apos;networking-layer&apos; depends on layer &apos;meta-python&apos;, but this layer is not enabled in your configuration
ERROR: Layer &apos;networking-layer&apos; depends on layer &apos;openembedded-layer&apos;, but this layer is not enabled in your configuration
Traceback (most recent call last):
  File &quot;/home/stephano/build/master/openembedded-core/bitbake/lib/bb/tinfoil.py&quot;, line 267, in prepare
    self.run_command(&apos;parseConfiguration&apos;)
...

Do you have your bitbake logs going somewhere other than stdout?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72298</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-04-11 15:54:13 +0000</bug_when>
    <thetext>I just updated again, and yes, it is now throwing a big red error message that is more clear.

I can&apos;t say that I like python back traces in my error messages, since they hide the real information .. but no need to change that just for this.

I&apos;m closing the bug as resolved/notabug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72304</commentid>
    <comment_count>3</comment_count>
    <who name="Stephano Cetola">stephano</who>
    <bug_when>2017-04-11 16:48:10 +0000</bug_when>
    <thetext>Sounds good, thanks for the update.

I think the stack trace, while not an eminent issue, is a symptom of larger issues in tinfoil. For example, the fact that the error (ERROR: Layer &apos;networking-layer&apos;) gets printed two times. Error handling inside tinfoil is inherently complex, however it could use with some polish at the least.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>