summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-yocto.bbclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 88dcf32a06..32d2e20a71 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -161,30 +161,30 @@ do_validate_branches() {
161 current=`git branch |grep \*|sed 's/^\* //'` 161 current=`git branch |grep \*|sed 's/^\* //'`
162 if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then 162 if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then
163 if [ -n "${KERNEL_REVISION_CHECKING}" ]; then 163 if [ -n "${KERNEL_REVISION_CHECKING}" ]; then
164 git show ${target_branch_head} > /dev/null 2>&1 164 ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
165 if [ $? -eq 0 ]; then 165 if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
166 echo "Forcing branch $current to ${target_branch_head}"
167 git branch -m $current $current-orig
168 git checkout -b $current ${target_branch_head}
169 else
170 echo "ERROR ${target_branch_head} is not a valid commit ID." 166 echo "ERROR ${target_branch_head} is not a valid commit ID."
171 echo "The kernel source tree may be out of sync" 167 echo "The kernel source tree may be out of sync"
172 exit 1 168 exit 1
173 fi 169 else
170 echo "Forcing branch $current to ${target_branch_head}"
171 git branch -m $current $current-orig
172 git checkout -b $current ${target_branch_head}
173 fi
174 fi 174 fi
175 fi 175 fi
176 176
177 if [ "$meta_head" != "$target_meta_head" ]; then 177 if [ "$meta_head" != "$target_meta_head" ]; then
178 if [ -n "${KERNEL_REVISION_CHECKING}" ]; then 178 if [ -n "${KERNEL_REVISION_CHECKING}" ]; then
179 git show ${target_meta_head} > /dev/null 2>&1 179 ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
180 if [ $? -eq 0 ]; then 180 if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
181 echo "Forcing branch meta to ${target_meta_head}"
182 git branch -m ${KMETA} ${KMETA}-orig
183 git checkout -b ${KMETA} ${target_meta_head}
184 else
185 echo "ERROR ${target_meta_head} is not a valid commit ID" 181 echo "ERROR ${target_meta_head} is not a valid commit ID"
186 echo "The kernel source tree may be out of sync" 182 echo "The kernel source tree may be out of sync"
187 exit 1 183 exit 1
184 else
185 echo "Forcing branch meta to ${target_meta_head}"
186 git branch -m ${KMETA} ${KMETA}-orig
187 git checkout -b ${KMETA} ${target_meta_head}
188 fi 188 fi
189 fi 189 fi
190 fi 190 fi