diff options
author | Matt Fleming <matt.fleming@intel.com> | 2014-03-06 11:04:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-07 14:45:22 +0000 |
commit | e8c99b37b27e6f7dd6fb685343398280de750c9c (patch) | |
tree | f96bca369e3b4745f0973c834edace1e4ae204b6 /meta | |
parent | a820b3f78ebcded07a81da3905c1bcdd4f173a23 (diff) | |
download | poky-e8c99b37b27e6f7dd6fb685343398280de750c9c.tar.gz |
kernel-yocto: Disable ANSI escape codes from git branch
'git branch' may use ANSI escape codes in its output (to provide colour)
which doesn't play well with commands expecting pure plain text, e.g.
fatal: '^[[31mmaster^[[m' is not a valid branch name.
Use the --no-color option to ensure all branch names are plain text.
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
(From OE-Core rev: 87acfdb28380c26344a79a9dc0b4b403173bdc44)
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index fb8e04e704..7913dd8c00 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -196,7 +196,7 @@ do_kernel_checkout() { | |||
196 | # If KMETA is defined, the branch must exist, but a machine branch | 196 | # If KMETA is defined, the branch must exist, but a machine branch |
197 | # can be missing since it may be created later by the tools. | 197 | # can be missing since it may be created later by the tools. |
198 | if [ -n "${KMETA}" ]; then | 198 | if [ -n "${KMETA}" ]; then |
199 | git branch -a | grep -q ${KMETA} | 199 | git branch -a --no-color | grep -q ${KMETA} |
200 | if [ $? -ne 0 ]; then | 200 | if [ $? -ne 0 ]; then |
201 | echo "ERROR. The branch '${KMETA}' is required and was not" | 201 | echo "ERROR. The branch '${KMETA}' is required and was not" |
202 | echo "found. Ensure that the SRC_URI points to a valid linux-yocto" | 202 | echo "found. Ensure that the SRC_URI points to a valid linux-yocto" |
@@ -214,7 +214,7 @@ do_kernel_checkout() { | |||
214 | fi | 214 | fi |
215 | 215 | ||
216 | # convert any remote branches to local tracking ones | 216 | # convert any remote branches to local tracking ones |
217 | for i in `git branch -a | grep remotes | grep -v HEAD`; do | 217 | for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do |
218 | b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`; | 218 | b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`; |
219 | git show-ref --quiet --verify -- "refs/heads/$b" | 219 | git show-ref --quiet --verify -- "refs/heads/$b" |
220 | if [ $? -ne 0 ]; then | 220 | if [ $? -ne 0 ]; then |