diff options
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 00d9667fe0..c2d0d3076f 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -184,11 +184,18 @@ do_kernel_checkout() { | |||
184 | source_dir=`echo ${S} | sed 's%/$%%'` | 184 | source_dir=`echo ${S} | sed 's%/$%%'` |
185 | source_workdir="${WORKDIR}/git" | 185 | source_workdir="${WORKDIR}/git" |
186 | if [ -d "${WORKDIR}/git/" ]; then | 186 | if [ -d "${WORKDIR}/git/" ]; then |
187 | # case: git repository (bare or non-bare) | 187 | # case: git repository |
188 | # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree. | 188 | # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree. |
189 | if [ "${source_dir}" != "${source_workdir}" ]; then | 189 | if [ "${source_dir}" != "${source_workdir}" ]; then |
190 | rm -rf ${S} | 190 | if [ -d "${source_workdir}/.git" ]; then |
191 | mv ${WORKDIR}/git ${S} | 191 | # regular git repository with .git |
192 | rm -rf ${S} | ||
193 | mv ${WORKDIR}/git ${S} | ||
194 | else | ||
195 | # create source for bare cloned git repository | ||
196 | git clone ${WORKDIR}/git ${S} | ||
197 | rm -rf ${WORKDIR}/git | ||
198 | fi | ||
192 | fi | 199 | fi |
193 | cd ${S} | 200 | cd ${S} |
194 | else | 201 | else |