Introduced poky upstream commit: 14df6d53b6 linux-yocto: improve checkout error handling and reporting
converts all remote branches to local branches. Our Linux repo has ~4500 remote branches: git branch -a | grep remotes |wc -l -> 4575 This costs our best workstations ~20 minutes to simply do that conversion in do_kernel_checkout which is not needed (at least I do not see any benefit after testing with this patch). Since this conversion is required for some linux-yocto workflows we introduce variable that allows skipping this on demand. Signed-off-by: Tomasz Dziendzielski <tomasz.dziendziel...@gmail.com> Signed-off-by: Jan Brzezanski <jan.brzezan...@gmail.com> Signed-off-by: Ricardo Rodrigues <rrodrigue...@gmail.com> Signed-off-by: Szymon Czarnuch <szymek125...@gmail.com> Signed-off-by: Kamil Kwiek <kamil.kw...@gmail.com> --- meta/classes/kernel-yocto.bbclass | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 1d5a8cdf29..68fb1af821 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -363,13 +363,15 @@ do_kernel_checkout() { cd ${S} # convert any remote branches to local tracking ones - for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do - b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`; - git show-ref --quiet --verify -- "refs/heads/$b" - if [ $? -ne 0 ]; then - git branch $b $i > /dev/null - fi - done + if [ "${KERNEL_SKIP_BRANCH_CONVERSION}" != "1" ]; then + for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do + b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`; + git show-ref --quiet --verify -- "refs/heads/$b" + if [ $? -ne 0 ]; then + git branch $b $i > /dev/null + fi + done + fi # Create a working tree copy of the kernel by checking out a branch machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" -- 2.33.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#157376): https://lists.openembedded.org/g/openembedded-core/message/157376 Mute This Topic: https://lists.openembedded.org/mt/86597675/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-