<?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>13447</bug_id>
          
          <creation_ts>2019-07-23 03:51:32 +0000</creation_ts>
          <short_desc>bitbake-layers layerindex-fetch -b fails</short_desc>
          <delta_ts>2019-09-23 18:24:56 +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>3.0</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 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Mark Hatle">mark.hatle</assigned_to>
          <cc>mark.hatle</cc>
    
    <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>84477</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2019-07-23 03:51:32 +0000</bug_when>
    <thetext>I just went to try adding a layer to my setup using bitbake-layers layerindex-fetch and got the following:

--------------- snip ---------------
$ bitbake-layers layerindex-fetch meta-iota -b master
NOTE: Starting bitbake server...
Loading https://layers.openembedded.org/layerindex/api/;branch=master...
Traceback (most recent call last):
  File &quot;/data/poky/bitbake/bin/bitbake-layers&quot;, line 93, in &lt;module&gt;
    ret = main()
  File &quot;/data/poky/bitbake/bin/bitbake-layers&quot;, line 86, in main
    return args.func(args)
  File &quot;/data/poky/bitbake/lib/bblayers/layerindex.py&quot;, line 113, in do_layerindex_fetch
    (dependencies, invalidnames) = lIndex.find_dependencies(names=args.layername, ignores=ignore_layers)
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 426, in find_dependencies
    (dependencies, invalid) = _resolve_dependencies(layerbranches, ignores, dependencies, invalid)
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 414, in _resolve_dependencies
    (dependencies, invalid) = _resolve_dependencies([deplayerbranch], ignores, dependencies, invalid)
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 414, in _resolve_dependencies
    (dependencies, invalid) = _resolve_dependencies([deplayerbranch], ignores, dependencies, invalid)
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 414, in _resolve_dependencies
    (dependencies, invalid) = _resolve_dependencies([deplayerbranch], ignores, dependencies, invalid)
  [Previous line repeated 985 more times]
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 386, in _resolve_dependencies
    deplayerbranch = layerdependency.dependency_layerBranch
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 1246, in dependency_layerBranch
    branchid = self.layerbranch.branch_id
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 1166, in layerbranch
    return self.index.layerBranches[self.layerbranch_id]
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 1153, in layerbranch_id
    return self.__getattr__(&apos;layerbranch&apos;)
  File &quot;/data/poky/bitbake/lib/layerindexlib/__init__.py&quot;, line 894, in __getattr__
    if name == &quot;index&quot; or name.startswith(&apos;_&apos;):
RecursionError: maximum recursion depth exceeded in comparison
--------------- snip ---------------

NOTE - I actually had the warrior branch checked out (I used -b master since the layer in question isn&apos;t shown as available in the index on warrior), so perhaps that is a factor here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84484</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-07-25 14:35:42 +0000</bug_when>
    <thetext>Does this mean we&apos;re missing some kind of test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84523</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2019-07-26 14:52:59 +0000</bug_when>
    <thetext>I&apos;ll investigate and see what I can come up with.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84524</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2019-07-26 15:18:27 +0000</bug_when>
    <thetext>I&apos;ve found the cause.  There is a circular dependency in the master branch of the layer index:

https://layers.openembedded.org/layerindex/branch/master/layer/meta-oe/

https://layers.openembedded.org/layerindex/branch/master/layer/meta-python/


meta-pyhton requires meta-oe, meta-oe requires meta-python.  This is fundamentally broken and what is triggering the problem.

Obviously I can resolve this in the software and say it&apos;s met from a dependency standpoint -but- when constructing things which one comes first?   Or is that simply undefined?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84571</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2019-08-01 20:40:44 +0000</bug_when>
    <thetext>Fix sent to bitbake-devel.  We now detect and abort the dependency processing (with a warning) when we encounter circular dependencies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84581</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2019-08-04 22:27:37 +0000</bug_when>
    <thetext>Hmm, yes - meta-oe should not be depending upon meta-python. I don&apos;t know how it came to be there, but I have now removed it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85045</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2019-09-23 17:59:28 +0000</bug_when>
    <thetext>Checked in:

https://git.openembedded.org/bitbake/commit/?id=d6155d095513be3f500d089c4ed4c4b89949d560</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>