<div dir="ltr"><div><div><div><div>Here&#39;s the patch that I came up with based on your change. The only difference<br></div>is that I modified the patching script to have a --clean option .. and used that<br></div>instead. That way we keep the internals hidden.<br><br></div>If this works for you, I can send it in my next kernel pull request.<br><br></div>Bruce<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 3, 2017 at 9:16 AM, Bruce Ashfield <span dir="ltr">&lt;<a href="mailto:bruce.ashfield@gmail.com" target="_blank">bruce.ashfield@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Feb 3, 2017 at 5:49 AM, Awais Belal <span dir="ltr">&lt;<a href="mailto:awais_belal@mentor.com" target="_blank">awais_belal@mentor.com</a>&gt;</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></span><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&#39;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&#39;t cause this sort of problem, but clearly there is a case.<br><br></div><div>I&#39;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&#39;t have to tweak the bbclass).<br><br></div><div>I&#39;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 class="h5"><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 &lt;<a href="mailto:awais_belal@mentor.com" target="_blank">awais_belal@mentor.com</a>&gt;<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" target="_blank">kernel-yocto.bb</a><wbr>class b/meta/classes/<a href="http://kernel-yocto.bb" target="_blank">kernel-yocto.bb</a><wbr>class<br>
index 5cfd8af..131c48a 100644<br>
--- a/meta/classes/<a href="http://kernel-yocto.bb" target="_blank">kernel-yocto.bb</a><wbr>class<br>
+++ b/meta/classes/<a href="http://kernel-yocto.bb" target="_blank">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 &quot;$current_branch-orig&quot;<br>
                        git reset --hard ${force_srcrev}<br>
+                       # We&#39;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_3647062007783465811m_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></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_3647062007783465811m_6164858625079764098gmail_signature" data-smartmail="gmail_signature">&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">&quot;Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end&quot;</div>
</div>