diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 6c92427704..38c886b21b 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -321,8 +321,8 @@ do_validate_branches() { | |||
321 | fi | 321 | fi |
322 | fi | 322 | fi |
323 | 323 | ||
324 | ref=`git show ${machine_srcrev} 2>&1 | head -n1 || true` | 324 | git cat-file -t ${machine_srcrev} > /dev/null |
325 | if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then | 325 | if [ if $? -ne 0 ]; then |
326 | echo "ERROR ${machine_srcrev} is not a valid commit ID." | 326 | echo "ERROR ${machine_srcrev} is not a valid commit ID." |
327 | echo "The kernel source tree may be out of sync" | 327 | echo "The kernel source tree may be out of sync" |
328 | exit 1 | 328 | exit 1 |
@@ -358,8 +358,8 @@ do_validate_branches() { | |||
358 | git show-ref --quiet --verify -- "refs/heads/${KMETA}" | 358 | git show-ref --quiet --verify -- "refs/heads/${KMETA}" |
359 | if [ $? -eq 0 ] && [ "${target_meta_head}" != "AUTOINC" ]; then | 359 | if [ $? -eq 0 ] && [ "${target_meta_head}" != "AUTOINC" ]; then |
360 | if [ "$meta_head" != "$target_meta_head" ]; then | 360 | if [ "$meta_head" != "$target_meta_head" ]; then |
361 | ref=`git show ${target_meta_head} 2>&1 | head -n1 || true` | 361 | git cat-file -t ${target_meta_head} > /dev/null |
362 | if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then | 362 | if [ $? -ne 0 ]; then |
363 | echo "ERROR ${target_meta_head} is not a valid commit ID" | 363 | echo "ERROR ${target_meta_head} is not a valid commit ID" |
364 | echo "The kernel source tree may be out of sync" | 364 | echo "The kernel source tree may be out of sync" |
365 | exit 1 | 365 | exit 1 |