summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-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 7deadcaedb..549dfd97a4 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -358,6 +358,21 @@ do_kernel_checkout() {
358 fi 358 fi
359 fi 359 fi
360 cd ${S} 360 cd ${S}
361
362 # convert any remote branches to local tracking ones
363 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
364 b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
365 git show-ref --quiet --verify -- "refs/heads/$b"
366 if [ $? -ne 0 ]; then
367 git branch $b $i > /dev/null
368 fi
369 done
370
371 # Create a working tree copy of the kernel by checking out a branch
372 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
373
374 # checkout and clobber any unimportant files
375 git checkout -f ${machine_branch}
361 else 376 else
362 # case: we have no git repository at all. 377 # case: we have no git repository at all.
363 # To support low bandwidth options for building the kernel, we'll just 378 # To support low bandwidth options for building the kernel, we'll just
@@ -379,21 +394,6 @@ do_kernel_checkout() {
379 git commit -q -m "baseline commit: creating repo for ${PN}-${PV}" 394 git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
380 git clean -d -f 395 git clean -d -f
381 fi 396 fi
382
383 # convert any remote branches to local tracking ones
384 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
385 b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
386 git show-ref --quiet --verify -- "refs/heads/$b"
387 if [ $? -ne 0 ]; then
388 git branch $b $i > /dev/null
389 fi
390 done
391
392 # Create a working tree copy of the kernel by checking out a branch
393 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
394
395 # checkout and clobber any unimportant files
396 git checkout -f ${machine_branch}
397} 397}
398do_kernel_checkout[dirs] = "${S} ${WORKDIR}" 398do_kernel_checkout[dirs] = "${S} ${WORKDIR}"
399 399