summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel-yocto.bbclass30
1 files changed, 15 insertions, 15 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 66cce92362..a1a073b738 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -320,6 +320,21 @@ do_kernel_checkout() {
320 fi 320 fi
321 fi 321 fi
322 cd ${S} 322 cd ${S}
323
324 # convert any remote branches to local tracking ones
325 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
326 b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
327 git show-ref --quiet --verify -- "refs/heads/$b"
328 if [ $? -ne 0 ]; then
329 git branch $b $i > /dev/null
330 fi
331 done
332
333 # Create a working tree copy of the kernel by checking out a branch
334 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
335
336 # checkout and clobber any unimportant files
337 git checkout -f ${machine_branch}
323 else 338 else
324 # case: we have no git repository at all. 339 # case: we have no git repository at all.
325 # To support low bandwidth options for building the kernel, we'll just 340 # To support low bandwidth options for building the kernel, we'll just
@@ -341,21 +356,6 @@ do_kernel_checkout() {
341 git commit -q -m "baseline commit: creating repo for ${PN}-${PV}" 356 git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
342 git clean -d -f 357 git clean -d -f
343 fi 358 fi
344
345 # convert any remote branches to local tracking ones
346 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
347 b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
348 git show-ref --quiet --verify -- "refs/heads/$b"
349 if [ $? -ne 0 ]; then
350 git branch $b $i > /dev/null
351 fi
352 done
353
354 # Create a working tree copy of the kernel by checking out a branch
355 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
356
357 # checkout and clobber any unimportant files
358 git checkout -f ${machine_branch}
359} 359}
360do_kernel_checkout[dirs] = "${S}" 360do_kernel_checkout[dirs] = "${S}"
361 361