<?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>12338</bug_id>
          
          <creation_ts>2017-11-13 07:50:31 +0000</creation_ts>
          <short_desc>checklayer: undefined LayerError</short_desc>
          <delta_ts>2018-03-28 20:02:58 +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>Scripts and Tools</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.5 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Anuj Mittal">anuj.mittal</assigned_to>
          <cc>ross.burton</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>78170</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2017-11-13 07:50:31 +0000</bug_when>
    <thetext>openembedded-core/scripts/lib/checklayer/__init__.py uses an undefined LayerError class, which fails when that code path is hit:

Traceback (most recent call last):
  File &quot;/fast/work/intel-iot-refkit/openembedded-core/scripts/yocto-check-layer&quot;, line 203, in &lt;module&gt;
    ret =  main()
  File &quot;/fast/work/intel-iot-refkit/openembedded-core/scripts/yocto-check-layer&quot;, line 100, in main
    dep_layers = detect_layers(args.dependency, args.no_auto)
  File &quot;/fast/work/intel-iot-refkit/openembedded-core/scripts/lib/checklayer/__init__.py&quot;, line 134, in detect_layers
    layer = _detect_layer(root)
  File &quot;/fast/work/intel-iot-refkit/openembedded-core/scripts/lib/checklayer/__init__.py&quot;, line 111, in _detect_layer
    layer[&apos;collections&apos;] = _get_layer_collections(layer[&apos;path&apos;])
  File &quot;/fast/work/intel-iot-refkit/openembedded-core/scripts/lib/checklayer/__init__.py&quot;, line 46, in _get_layer_collections
    raise LayerError(exc)
NameError: name &apos;LayerError&apos; is not defined

I happened to trigger this when adding meta-measured to refkit. meta-measured/conf/layer.conf uses BBPATH := &quot;${BBPATH}:${LAYERDIR}&quot; instead of the normal BBPATH .= &quot;:${LAYERDIR}&quot;, and that causes:

Traceback (most recent call last):
  File &quot;/fast/work/intel-iot-refkit/openembedded-core/scripts/lib/checklayer/__init__.py&quot;, line 44, in _get_layer_collections
    ldata = bb.parse.handle(lconf, ldata, include=True)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/parse/__init__.py&quot;, line 117, in handle
    return h[&apos;handle&apos;](fn, data, include)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 165, in handle
    statements.eval(data)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/parse/ast.py&quot;, line 36, in eval
    statement.eval(data)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/parse/ast.py&quot;, line 58, in eval
    bb.parse.ConfHandler.include(self.filename, s, self.lineno, data, &quot;include required&quot;)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 83, in include
    include_single_file(parentfn, fn, lineno, data, error_out)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 94, in include_single_file
    bbpath = &quot;%s:%s&quot; % (dname, data.getVar(&quot;BBPATH&quot;))
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/data_smart.py&quot;, line 608, in getVar
    return self.getVarFlag(var, &quot;_content&quot;, expand, noweakdefault, parsing)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/data_smart.py&quot;, line 794, in getVarFlag
    value = self.expand(value, cachename)
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/data_smart.py&quot;, line 436, in expand
    return self.expandWithRefs(s, varname).value
  File &quot;/fast/work/intel-iot-refkit/bitbake/lib/bb/data_smart.py&quot;, line 426, in expandWithRefs
    raise ExpansionError(varname, s, exc) from exc
bb.data_smart.ExpansionError: Failure expanding variable BBPATH, expression was ${BBPATH}:/fast/work/intel-iot-refkit/meta-measured which triggered exception Exception: variable BBPATH references itself!

Building with meta-measured is fine, it&apos;s just the compat check which fails?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80016</commentid>
    <comment_count>1</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2018-03-28 20:02:58 +0000</bug_when>
    <thetext>https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c37053857d634a9185aaaf513fd96d3e4a735c2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>