All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: [PATCH 09/18] kernel-yocto: clean overly complex branch checkout
Date: Sat, 30 Aug 2014 00:38:12 -0400	[thread overview]
Message-ID: <99bc596604dacbf1000867edec07e47f6305f65a.1409345003.git.bruce.ashfield@windriver.com> (raw)
In-Reply-To: <cover.1409345003.git.bruce.ashfield@windriver.com>

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@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



  parent reply	other threads:[~2014-08-30  4:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-30  4:38 [PATCH 00/18] kernel-yocto: consolidated pull request Bruce Ashfield
2014-08-30  4:38 ` [PATCH 01/18] kernel-yocto: use cat-file instead of git-show Bruce Ashfield
2014-08-30  4:38 ` [PATCH 02/18] kernel-yocto: move SRCREV validation to patching phase Bruce Ashfield
2014-08-30 13:55   ` Richard Purdie
2014-08-31  0:52     ` Bruce Ashfield
2014-08-31  5:25     ` Bruce Ashfield
2014-08-30  4:38 ` [PATCH 03/18] kernel-yocto: remove containing branch check Bruce Ashfield
2014-08-30  4:38 ` [PATCH 04/18] kernel-yocto: remove SRC_URI kbranch validation Bruce Ashfield
2014-08-30  4:38 ` [PATCH 05/18] kernel-yocto: remove branch existence checking in do_validate_branches Bruce Ashfield
2014-08-30  4:38 ` [PATCH 06/18] kernel-yocto: remove KBRANCH_DEFAULT Bruce Ashfield
2014-08-30  4:38 ` [PATCH 07/18] kernel-yocto: simplify branch SRCREV validation Bruce Ashfield
2014-08-30  4:38 ` [PATCH 08/18] kernel-yocto: use show-ref instead of branch -a Bruce Ashfield
2014-08-30  4:38 ` Bruce Ashfield [this message]
2014-08-30  4:38 ` [PATCH 10/18] kernel-yocto: allow custom non-meta, SRCREV format builds Bruce Ashfield
2014-08-30  4:38 ` [PATCH 11/18] kernel-yocto: remove KBRANCH_DEFAULT Bruce Ashfield
2014-08-30  4:38 ` [PATCH 12/18] kernel-yocto: convert echo statements to bb* equivalents Bruce Ashfield
2014-08-30  4:38 ` [PATCH 13/18] kern-tools: allow meta branch and meta data directory to differ Bruce Ashfield
2014-08-30  4:38 ` [PATCH 14/18] images: introduce core-image-kernel-dev Bruce Ashfield
2014-08-30  4:38 ` [PATCH 15/18] linux-yocto/3.14: vhost, vxland, openvswitch and block/bfq updates Bruce Ashfield
2014-08-30  4:38 ` [PATCH 16/18] linux-yocto/3.14: update to v3.14.17 Bruce Ashfield
2014-08-30  4:38 ` [PATCH 17/18] linux-yocto/3.4: remove 3.4 name recipes Bruce Ashfield
2014-08-30  4:38 ` [PATCH 18/18] linux-libc-headers: update to 3.16 Bruce Ashfield
2014-08-31 10:07 ` [PATCH 00/18] kernel-yocto: consolidated pull request Richard Purdie
2014-08-31 13:57   ` Bruce Ashfield
2014-09-01  1:53   ` Bruce Ashfield
2014-09-01  2:39   ` Bruce Ashfield
2014-09-01 16:12     ` Richard Purdie
2014-09-02 12:11       ` Bruce Ashfield
2014-08-31 23:41 ` Otavio Salvador
2014-09-01  1:18   ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99bc596604dacbf1000867edec07e47f6305f65a.1409345003.git.bruce.ashfield@windriver.com \
    --to=bruce.ashfield@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.