Skip to contentSkip to conversation

Test in do_patch() fails for annotated tags

DISCUSSION Jeff Wang 2 participants 2 messages Nov 7, 2014

lore
Share & tools
lore

Jeff Wang

author
#0 lore raw

Commit 92c1ece6c347030d48995a36f4c67861356e59d3 causes the test in do_patch() in kernel-yocto.bbclass to fail if ${machine_srcrev} is an annotated tag. The check is meant to ensure that ${machine_srcrev} is an ancestor of HEAD, but if ${machine_srcrev} is a tag, then "$(git rev-parse --verify ${machine_srcrev})" evaluates to the SHA of the tag instead of what it's pointing to.

Replacing "$(git rev-parse --verify ${machine_srcrev})" with "$(git rev-parse --verify ${machine_srcrev}~0)" seems to fix the problem. See http://stackoverflow.com/a/1863712/1454667

Signature · 1 line
Jeff Wang
#1 lore raw

Jeff and I have already exchanged email on this yesterday. While using a tag for the SRCREV is not typically something we suggest .. tweaking the ancestor check is fine in this case, since it works in both scenarios.

I have a patch queued to address this, and am soaking it now.

Bruce

Quoted 22 lines · Jeff Wang

Commit 92c1ece6c347030d48995a36f4c67861356e59d3 causes the test in do_patch() in kernel-yocto.bbclass to fail if ${machine_srcrev} is an annotated tag. The check is meant to ensure that ${machine_srcrev} is an ancestor of HEAD, but if ${machine_srcrev} is a tag, then "$(git rev-parse --verify ${machine_srcrev})" evaluates to the SHA of the tag instead of what it's pointing to.

Replacing "$(git rev-parse --verify ${machine_srcrev})" with "$(git rev-parse --verify ${machine_srcrev}~0)" seems to fix the problem. See
http://stackoverflow.com/a/1863712/1454667

--
Jeff Wang

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"