<?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>9227</bug_id>
          
          <creation_ts>2016-03-08 11:13:30 +0000</creation_ts>
          <short_desc>Dependency chain analysis isn&apos;t optimal</short_desc>
          <delta_ts>2019-02-17 10:32:11 +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>2.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard> </status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</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>59787</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-08 11:13:30 +0000</bug_when>
    <thetext>I managed to crash the dependency chain finding code with a &quot;simple&quot; metadata change.

In glibc:
BBCLASSEXTEND=native
DEPENDS_class-target=&quot;&quot;

In base.bbclass, around INHIBIT_DEFAULT_DEPS add glibc-native if native.

Bitbaking something will then crash the dependency cycle code:

ERROR: An uncaught exception occured in runqueue, please see the failure below:
ERROR: Running idle function
Traceback (most recent call last):
 File &quot;/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 345, in find_chains(taskid=2, prev_chain=[0, 1, 7, 8, 4, 2]):
                    if scan:
   &gt;                    find_chains(revdep, copy.deepcopy(prev_chain))
                    for dep in explored_deps[revdep]:
 File &quot;/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 345, in find_chains(taskid=5, prev_chain=[0, 1, 7, 8, 4, 2, 5]):
                    if scan:
   &gt;                    find_chains(revdep, copy.deepcopy(prev_chain))
                    for dep in explored_deps[revdep]:
 File &quot;/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 345, in find_chains(taskid=67, prev_chain=[0, 1, 7, 8, 4, 2, 5, 67]):
                    if scan:
   &gt;                    find_chains(revdep, copy.deepcopy(prev_chain))
                    for dep in explored_deps[revdep]:
 File &quot;/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 345, in find_chains(taskid=68, prev_chain=[0, 1, 7, 8, 4, 2, 5, 67, 68]):
                    if scan:
   &gt;                    find_chains(revdep, copy.deepcopy(prev_chain))
                    for dep in explored_deps[revdep]:
 File &quot;/home/ross/Yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 346, in find_chains(taskid=64, prev_chain=[0, 1, 7, 8, 4, 2, 5, 67, 68, 64]):
                        find_chains(revdep, copy.deepcopy(prev_chain))
   &gt;                for dep in explored_deps[revdep]:
                        if dep not in total_deps:
KeyError: 65</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59788</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-03-08 11:14:50 +0000</bug_when>
    <thetext>I&apos;m reliably informed that page 1015 of Advanced Engineering Mathematics by Kryzig covers shortest path problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83031</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-02-17 10:32:11 +0000</bug_when>
    <thetext>I applied:

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 9eda11ad048..209a7b734a4 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -70,6 +70,7 @@ BASE_DEFAULT_DEPS = &quot;virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compile
 BASEDEPENDS = &quot;&quot;
 BASEDEPENDS_class-target = &quot;${@base_dep_prepend(d)}&quot;
 BASEDEPENDS_class-nativesdk = &quot;${@base_dep_prepend(d)}&quot;
+BASEDEPENDS_class-native = &quot;glibc-native&quot;
 
 DEPENDS_prepend=&quot;${BASEDEPENDS} &quot;
 
diff --git a/meta/recipes-core/glibc/glibc_2.29.bb b/meta/recipes-core/glibc/glibc_2.29.bb
index 72db00cdb77..572f7146c93 100644
--- a/meta/recipes-core/glibc/glibc_2.29.bb
+++ b/meta/recipes-core/glibc/glibc_2.29.bb
@@ -131,4 +131,6 @@ do_compile () {
 
 require glibc-package.inc
 
-BBCLASSEXTEND = &quot;nativesdk&quot;
+BBCLASSEXTEND = &quot;nativesdk native&quot;
+DEPENDS_class-native = &quot;&quot;
+INHIBIT_DEFAULT_DEPS_class-native = &quot;1&quot;

and just got dependency loops which exited after 10 loops were found (recent fix). Closing as this appears to work now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>