<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 13 July 2017 at 04:33, Chang Rebecca Swee Fun <span dir="ltr">&lt;<a href="mailto:rebecca.swee.fun.chang@intel.com" target="_blank">rebecca.swee.fun.chang@intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-:233" class="gmail-a3s gmail-aXjCH gmail-m15d3a02836707ee7">     if not srcuri:<br>
         lines_before.append(&#39;# No information for SRC_URI yet (only an external source tree was specified)&#39;)<br>
+    # Check if users has provide a branch<br>
+    append_branch = branch_re.search(srcuri)<br>
+    if branch and not append_branch:<br>
+        # Append the correct branch into SRC_URI<br>
+        srcuri += (&#39;;branch=%s&#39; % str(branch))</div></blockquote></div><br>Traceback (most recent call last):<br>  File &quot;TOPDIR/tmp/work/qemumips-poky-linux/core-image-minimal/1.0-r0/testsdkext/layers/build/scripts/recipetool&quot;, line 121, in &lt;module&gt;<br>    ret = main()<br>  File &quot;TOPDIR/tmp/work/qemumips-poky-linux/core-image-minimal/1.0-r0/testsdkext/layers/build/scripts/recipetool&quot;, line 110, in main<br>    ret = args.func(args)<br>  File &quot;TOPDIR/tmp/work/qemumips-poky-linux/core-image-minimal/1.0-r0/testsdkext/layers/build/scripts/lib/recipetool/create.py&quot;, line 638, in create_recipe<br>    append_branch = branch_re.search(srcuri)<br>UnboundLocalError: local variable &#39;branch_re&#39; referenced before assignment</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also this conflicts with other things in master, so can you rebase when fixing this.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra">Ross</div></div>