[linux-yocto] kernel-yocto: validate_branches questions

Bruce Ashfield bruce.ashfield at windriver.com
Tue Feb 18 11:29:18 PST 2014

On 14-02-18 10:51 AM, Moore, Tysen wrote:
> Bruce,
> Thanks for the fast response.  I only posted the question yesterday.

I like to reply quickly to problems :)

> The "KMETA Check" that I am referring to is:
>     ## KMETA branch validation
>      meta_head=`git show-ref -s --heads ${KMETA}`
>      target_meta_head="${SRCREV_meta}"
>     git show-ref --quiet --verify -- "refs/heads/${KMETA}"
>     if [ $? -eq 1 ]; then
>         return #<<<<<<<<<<<<<<< EXITS HERE
>     fi
> Because with KMETA not defined here it exists early.  The problem is 
> that the earlier "SRCREV loop" starts with, "git checkout -q master".  
> Since KMETA is not defined and we exit early the code that follows the 
> KMETA check to change back to KBRANCH is not executed.

Correct. But that's supposed to be safe, the checkout of the machine
branch at the bottom of the routine is not supposed to be the last
manipulation of the branches. You should still end up on the right
branch when the build happens.

I'm driving to understand why that is happening.

Can you share some specific details ?  If this is master, and you
go into the kernel's source directory tmp/work/*/linux/ and cat
.meta/top_tgt, that should point to a generated file, what are the
contents of that generated description.

One solution would be to allow that final git checkout to run (as
you mentioned), but if other manipulations of the tree happen,
you'll still be broken, and I want to avoid that.


> The only workaround I've come up with is very hackish--embarrassing to 
> post;-)
> do_validate_branches_prepend() {
>     KMETA="${KBRANCH}"
>     SRCREV_meta="${SRCREV}"
>     SRCREV_machine="${SRCREV}"
> }
> do_validate_branches_append() {
>     KMETA=""
>     SRCREV_meta=""
>     SRCREV_machine=""
> }
> [As you can imagine I'd prefer not to use this hack.]
> The problem is that if I do not clear KMETA the configme (kgit-meta 
> and friends) call later fails.  The kernel_configme code allows KMETA 
> to be undefined but it is almost like the validate_branches is coded 
> without that same option.  Shouldn't the KMETA "check" code listed 
> above be skipped when KMETA is not defined? I think this change to the 
> validate_branches code would fix this use case.  I don't think it 
> would break other use cases, but I am rather green with Yocto.
> Thanks again for the detailed description and help.
> Tysen
> XSe Logo
> *XS Embedded LLC*
> 29065 Cabot Drive, Suite 200
> Novi, MI 48377
> Phone 	+1 (248) 209 - 6613
> Fax 	+1 (248) 281 - 7020
> www.xs-embedded.com <http://www.xs-embedded.com>
> Tysen.Moore at xs-embedded.com <mailto:Tysen.Moore at xs-embedded.com>
> *:::::::::: based.on.visions ::::::::::*
> XS Embedded LLC
> Managing Director: Joachim Kobinger
> Confidentiality Notice: This e-mail message, including any 
> attachments, is for the sole use of the intended recipient(s) and may 
> contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by return e-mail and 
> destroy all copies of the original message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/linux-yocto/attachments/20140218/d99368ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 781 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/linux-yocto/attachments/20140218/d99368ec/attachment.gif>

More information about the linux-yocto mailing list