<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 3, 2017 at 5:49 AM, Awais Belal <span dir="ltr"><<a href="mailto:awais_belal@mentor.com" target="_blank">awais_belal@mentor.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In some cases it is seen that kernel_checkout and<br>
validate_branches are run again in simultaneous builds.<br>
During do_patch the kgit-s2q mechanism creates and<br>
checks for the kgit-s2q.last file inside the .git<br>
directory, finds a fence post and starts picking up<br>
patches after that. This can create trouble as<br>
validate_branches checks out the HEAD of the branch<br>
and so the patches should be reapplied rather than<br>
skipped due to finding of the fence post.<br></blockquote><div><br></div><div>Indeed. I can see how this could happen. I added the mechanism to ensure<br></div><div>that multiple runs (forced or not) didn't re-patch the tree (since the tools no<br></div><div>longer do an auto-resume detection).<br><br></div><div>At that time, I tried to run the paths and make sure that the sentinel file<br></div><div>couldn't cause this sort of problem, but clearly there is a case.<br><br></div><div>I'll grab this patch and modify it a bit so the script can clear the file itself<br></div><div>(that way if the format changes again, we don't have to tweak the bbclass).<br><br></div><div>I'll float that patch by you, if that is ok, so you can add a Signed-off-by <br></div><div>(since the work on finding the issue deserves credit on the patch itself).<br><br></div><div>Cheers,<br><br></div><div>Bruce<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Signed-off-by: Awais Belal <<a href="mailto:awais_belal@mentor.com" target="_blank">awais_belal@mentor.com</a>><br>
---<br>
meta/classes/kernel-yocto.bbc<wbr>lass | 4 ++++<br>
1 file changed, 4 insertions(+)<br>
<br>
diff --git a/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class b/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
index 5cfd8af..131c48a 100644<br>
--- a/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
+++ b/meta/classes/<a href="http://kernel-yocto.bb">kernel-yocto.bb</a><wbr>class<br>
@@ -350,6 +350,10 @@ do_validate_branches() {<br>
current_branch=`git rev-parse --abbrev-ref HEAD`<br>
git branch "$current_branch-orig"<br>
git reset --hard ${force_srcrev}<br>
+ # We've checked out HEAD, make sure we cleanup kgit-s2q fence post check<br>
+ # so the patches are applied as expected otherwise no patching<br>
+ # would be done in some corner cases.<br>
+ rm -rf ${S}/.git/kgit-s2q.last<br>
fi<br>
fi<br>
}<br>
<span class="m_6164858625079764098HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openem<wbr>bedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="m_6164858625079764098gmail_signature" data-smartmail="gmail_signature">"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>