<div dir="ltr"><div>I&#39;m trying to write a recipe for a local repo that is kept in mercurial, and encountering the following problem:</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Traceback (most recent call last):<br>  File &quot;/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py&quot;, line 808, in DataSmart.getVarFlag(var=&#39;PV&#39;, flag=&#39;_content&#39;, expand=True, noweakdefault=False, parsing=False, retparser=False):<br>             if expand or retparser:<br>    &gt;            parser = self.expandWithRefs(value, cachename)<br>             if expand:<br>  File &quot;/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py&quot;, line 416, in DataSmart.expandWithRefs(s=&#39;0.0.4+git${SRCPV}&#39;, varname=&#39;PV&#39;):<br>                 try:<br>    &gt;                s = __expand_var_regexp__.sub(varparse.var_sub, s)<br>                     try:<br>  File &quot;/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py&quot;, line 108, in VariableParse.var_sub(match=&lt;_sre.SRE_Match object; span=(9, 17), match=&#39;${SRCPV}&#39;&gt;):<br>                         raise Exception(&quot;variable %s references itself!&quot; % self.varname)<br>    &gt;            var = self.d.getVarFlag(key, &quot;_content&quot;)<br>                 self.references.add(key)<br>  File &quot;/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py&quot;, line 808, in DataSmart.getVarFlag(var=&#39;SRCPV&#39;, flag=&#39;_content&#39;, expand=True, noweakdefault=False, parsing=False, retparser=False):<br>             if expand or retparser:<br>    &gt;            parser = self.expandWithRefs(value, cachename)<br>             if expand:<br>  File &quot;/home/joel-cohen/code/waveos2/poky/bitbake/lib/bb/data_smart.py&quot;, line 430, in DataSmart.expandWithRefs(s=&#39;${@bb.fetch2.get_srcrev(d)}&#39;, varname=&#39;SRCPV&#39;):<br>                 except Exception as exc:<br>    &gt;                raise ExpansionError(varname, s, exc) from exc<br>     <br>bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError: &#39;FetchData&#39; object has no attribute &#39;moddir&#39;</blockquote><div><br></div><div>I&#39;ve fixed this with the following patch, which moves some code in the Hg fetcher to later in the urldata_init method, after some necessary variables have been initialized. I&#39;m not sure if I&#39;m alone in seeing this problem or not?</div><div><br></div><div><br></div><div>ALSO (I&#39;m not sure if this is bitbake-related or poky-related): what is it that is supposed to create the $(BUILDDIR)/tmp/hosttools/hg symlink? </div><div><div><br></div><div>For some reason, this link is not created for me automatically. It works fine if I create it manually.</div></div><div><br></div><div><br></div><div>Thanks for any help,</div><div>Aaron</div></div>