[OE-core] [PATCH] [RFC]kernel-yocto.bbclass: ensure repatching when HEAD is checked out

Bruce Ashfield bruce.ashfield at gmail.com
Fri Feb 3 18:20:47 UTC 2017


Here's the patch that I came up with based on your change. The only
difference
is that I modified the patching script to have a --clean option .. and used
that
instead. That way we keep the internals hidden.

If this works for you, I can send it in my next kernel pull request.

Bruce

On Fri, Feb 3, 2017 at 9:16 AM, Bruce Ashfield <bruce.ashfield at gmail.com>
wrote:

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



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170203/63682011/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-kernel-yocto.bbclass-ensure-repatching-when-HEAD-is-.patch
Type: text/x-patch
Size: 2226 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170203/63682011/attachment-0002.bin>


More information about the Openembedded-core mailing list