<?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>11593</bug_id>
          
          <creation_ts>2017-05-31 05:45:26 +0000</creation_ts>
          <short_desc>bb.fetch2.get_srcrev ExpansionError with ;subdir=${S} SRC_URIs</short_desc>
          <delta_ts>2021-09-11 21:42:05 +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>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mikko Ylinen">mikko.ylinen</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>freebendy</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</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>73576</commentid>
    <comment_count>0</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-05-31 05:45:26 +0000</bug_when>
    <thetext>When adding ${SRCPV} to PV with SRC_URIs that use &quot;subdir=${S}&quot;, bitbake errors with ExpansionError:

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception RuntimeError: maximum recursion depth exceeded</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73954</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-06-09 16:58:10 +0000</bug_when>
    <thetext>Adding ;subdir=${S} to psplash_git.bb is enough to reproduce this. The issue is that:

SRC_URI = &quot;${S}&quot;
S = &quot;${WORKDIR}&quot;
WORKDIR = &quot;xxx/${PV}&quot;
PV = &quot;${SRCPV}&quot;
SRCPV = &quot;${@bb.fetch2.get_srcrev(d)}&quot;

and get_srcrev(d) will expand SRC_URI.

So the code is correct, recursion is occurring and there are circular references.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75976</commentid>
    <comment_count>2</comment_count>
    <who name="Ben Guan">freebendy</who>
    <bug_when>2017-08-18 01:59:47 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Adding ;subdir=${S} to psplash_git.bb is enough to reproduce this. The issue
&gt; is that:
&gt; 
&gt; SRC_URI = &quot;${S}&quot;
&gt; S = &quot;${WORKDIR}&quot;
&gt; WORKDIR = &quot;xxx/${PV}&quot;
&gt; PV = &quot;${SRCPV}&quot;
&gt; SRCPV = &quot;${@bb.fetch2.get_srcrev(d)}&quot;
&gt; 
&gt; and get_srcrev(d) will expand SRC_URI.
&gt; 
&gt; So the code is correct, recursion is occurring and there are circular
&gt; references.

It could be reproduced also when using &quot;destsuffix&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91380</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-09-10 14:09:02 +0000</bug_when>
    <thetext>Patches sent to make recursion errors more understandable and detect the fetcher special case variable self references.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91391</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-09-11 21:42:05 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=3a737a783cedd128ae8c8b1c4f55642b9a5691ae
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=433cff7297cc60528f003add2b495e218b2d392c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>