* [PATCH 0/1] kernel-yocto: fix machine_srcrev check in do_patch
@ 2015-07-08 19:02 Petter Mabäcker
2015-07-08 19:02 ` [PATCH 1/1] " Petter Mabäcker
0 siblings, 1 reply; 2+ messages in thread
From: Petter Mabäcker @ 2015-07-08 19:02 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 0aaa67a790ab211b35eed58173efa115ceb6e243:
oeqa/bbtests: Fix to ensure DL_DIR is set (2015-07-08 13:09:28 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib petmab/fix_faulty_srcrev_check
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=petmab/fix_faulty_srcrev_check
Petter Mabäcker (1):
kernel-yocto: fix machine_srcrev check in do_patch
meta/classes/kernel-yocto.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] kernel-yocto: fix machine_srcrev check in do_patch
2015-07-08 19:02 [PATCH 0/1] kernel-yocto: fix machine_srcrev check in do_patch Petter Mabäcker
@ 2015-07-08 19:02 ` Petter Mabäcker
0 siblings, 0 replies; 2+ messages in thread
From: Petter Mabäcker @ 2015-07-08 19:02 UTC (permalink / raw)
To: openembedded-core
do_patch is currently doing checks with machine_srcrev without initiate
it which leads to below (additional debug added):
DEBUG: Executing shell function do_patch
.
.
.
+ [ 0 -ne 0 ]
+ [ != AUTOINC ]
+ git rev-parse --verify ~0
fatal: Needed a single revision
+ git merge-base HEAD
usage: git merge-base [-a|--all] <commit> <commit>...
or: git merge-base [-a|--all] --octopus <commit>...
or: git merge-base --independent <commit>...
or: git merge-base --is-ancestor <commit> <commit>
or: git merge-base --fork-point <ref> [<commit>]
-a, --all output all common ancestors
--octopus find ancestors for a single n-way merge
--independent list revs not reachable from others
--is-ancestor is the first one ancestor of the other?
--fork-point find where <commit> forked from reflog of <ref>
+ [ = ]
+ set +x
DEBUG: Shell function do_patch finished
Only reason it works today is because 'rev-parse/merge-base' with empty machine_srcrev
will result in "false positive". Solve this by adding a similar non-empty check and
use SRCREV as fallback as in 'do_kernel_metadata'
Signed-off-by: Petter Mabäcker <petter@technux.se>
---
meta/classes/kernel-yocto.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 6fd025e..fb14926 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -168,6 +168,16 @@ do_patch() {
# check to see if the specified SRCREV is reachable from the final branch.
# if it wasn't something wrong has happened, and we should error.
+ machine_srcrev="${SRCREV_machine}"
+ if [ -z "${machine_srcrev}" ]; then
+ # fallback to SRCREV if a non machine_meta tree is being built
+ machine_srcrev="${SRCREV}"
+ # if SRCREV cannot be reached something is wrong.
+ if [ -z "${machine_srcrev}" ]; then
+ bbfatal "Neither SRCREV_machine or SRCREV was specified!"
+ fi
+ fi
+
if [ "${machine_srcrev}" != "AUTOINC" ]; then
if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-08 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 19:02 [PATCH 0/1] kernel-yocto: fix machine_srcrev check in do_patch Petter Mabäcker
2015-07-08 19:02 ` [PATCH 1/1] " Petter Mabäcker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox