Patchwork [2/3] kernel-yocto.bbclass: Delete superfluous creation of ${S}/.git directory

login
register
mail settings
Submitter Bruce Ashfield
Date July 20, 2012, 3:19 p.m.
Message ID <377ea49225173c0366190dff73355126ee93e8db.1342796935.git.bruce.ashfield@windriver.com>
Download mbox | patch
Permalink /patch/32719/
State Accepted
Commit f0d318177096a7a1c7406642663ae4ce28010d12
Headers show

Comments

Bruce Ashfield - July 20, 2012, 3:19 p.m.
From: "Robert P. J. Day" <rpjday@crashcourse.ca>

In do_kernel_checkout(), replace the creation of ${S}/.git with just
the creation of ${S} since the .git subdirectory is created only a few
lines later using a "mv".  Here's the original code:

  rm -rf ${S}
  mkdir -p ${S}/.git

  echo "WARNING. ${WORKDIR}/git is not a bare clone."
  echo "Ensure that the SRC_URI includes the 'bareclone=1' option."

  # we can fix up the kernel repository, but at the least the meta
  # branch must be present. The machine branch may be created later.
  mv ${WORKDIR}/git/.git ${S}    <-- See?  There it is.

There's no functional change here, it's just less confusing.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel-yocto.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 1e08faa..f09d503 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -106,7 +106,7 @@  do_kernel_checkout() {
 	if [ -d "${WORKDIR}/git/" ] && [ -d "${WORKDIR}/git/.git" ]; then
 		# we build out of {S}, so ensure that ${S} is clean and present
 		rm -rf ${S}
-		mkdir -p ${S}/.git
+		mkdir -p ${S}
 
 		echo "WARNING. ${WORKDIR}/git is not a bare clone."
 		echo "Ensure that the SRC_URI includes the 'bareclone=1' option."