summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2011-09-16 09:38:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-20 22:24:09 +0100
commit28c3aa8b85dac016d38a83dc17b46e0ac76c1caa (patch)
tree8102e0f1521067b1345d717bf7d1bfacb41c8a34 /bitbake/lib/bb/fetch2/git.py
parent35fdd5a1954a1bb678f5d747a9154218fd4b82f5 (diff)
downloadpoky-28c3aa8b85dac016d38a83dc17b46e0ac76c1caa.tar.gz
fetch2/git: be more carefull in _contains_ref when checking git log output
* in some cases there could be output like this ERROR: ld.so: object 'libpseudo.so' from LD_PRELOAD cannot be preloaded: ignored. before wc -l output and returned 'output.split()[0] != 0' is always True (Bitbake rev: 3a54dcc09a12406ec6cf22b4b1a2cc4fc203822c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 26236b81bc..4a4c30d5e4 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -239,7 +239,10 @@ class Git(FetchMethod):
239 239
240 def _contains_ref(self, tag, d): 240 def _contains_ref(self, tag, d):
241 basecmd = data.getVar("FETCHCMD_git", d, True) or "git" 241 basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
242 output = runfetchcmd("%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (basecmd, tag), d, quiet=True) 242 cmd = "%s log --pretty=oneline -n 1 %s -- 2> /dev/null | wc -l" % (basecmd, tag)
243 output = runfetchcmd(cmd, d, quiet=True)
244 if len(output.split()) > 1:
245 raise bb.fetch2.FetchError("The command '%s' gave output with more then 1 line unexpectedly, output: '%s'" % (cmd, output))
243 return output.split()[0] != "0" 246 return output.split()[0] != "0"
244 247
245 def _revision_key(self, url, ud, d, name): 248 def _revision_key(self, url, ud, d, name):