diff options
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 6fd025ef1e..fb14926fad 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -168,6 +168,16 @@ do_patch() { | |||
168 | 168 | ||
169 | # check to see if the specified SRCREV is reachable from the final branch. | 169 | # check to see if the specified SRCREV is reachable from the final branch. |
170 | # if it wasn't something wrong has happened, and we should error. | 170 | # if it wasn't something wrong has happened, and we should error. |
171 | machine_srcrev="${SRCREV_machine}" | ||
172 | if [ -z "${machine_srcrev}" ]; then | ||
173 | # fallback to SRCREV if a non machine_meta tree is being built | ||
174 | machine_srcrev="${SRCREV}" | ||
175 | # if SRCREV cannot be reached something is wrong. | ||
176 | if [ -z "${machine_srcrev}" ]; then | ||
177 | bbfatal "Neither SRCREV_machine or SRCREV was specified!" | ||
178 | fi | ||
179 | fi | ||
180 | |||
171 | if [ "${machine_srcrev}" != "AUTOINC" ]; then | 181 | if [ "${machine_srcrev}" != "AUTOINC" ]; then |
172 | if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then | 182 | if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then |
173 | bberror "SRCREV ${machine_srcrev} was specified, but is not reachable" | 183 | bberror "SRCREV ${machine_srcrev} was specified, but is not reachable" |