[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 09/18] kernel-yocto: clean overly complex branch checkout
From:       bruce.ashfield () windriver ! com (Bruce Ashfield)
Date:       2014-08-30 4:38:12
Message-ID: 99bc596604dacbf1000867edec07e47f6305f65a.1409345003.git.bruce.ashfield () windriver ! com
[Download RAW message or body]

Since the git fetcher ensures that branches exist, we no longer need to
validate the branch and have a conditional checkout of the source.

We can remove some checks and ensure that whenever we exit the
do_kernel_checkout routine that a branch is always checked out.

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
---
 meta/classes/kernel-yocto.bbclass | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 9209f423cff1..69620f0a4275 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -221,17 +221,16 @@ do_kernel_checkout() {
 		fi
 	fi
 	
-	machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
 
 	# Create a working tree copy of the kernel by checking out a branch
+	machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
 	git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
 	if [ $? -eq 0 ]; then
-		# checkout and clobber any unimportant files
-		git checkout -f ${machine_branch}
-	else
-		echo "Not checking out ${machine_branch}, it will be created later"
-		git checkout -f master
+		machine_branch = "master"
 	fi
+
+	# checkout and clobber any unimportant files
+	git checkout -f ${machine_branch}
 }
 do_kernel_checkout[dirs] = "${S}"
 
-- 
1.8.1.2


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic