aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin SmoczyƄski <marcin.smoczynski@enigma.com.pl>2015-04-02 14:24:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-19 12:00:32 +0100
commitefa44d04137977f883db4a643b0f774e91514722 (patch)
tree549471c96b6b286ac32d30a4be2e1be0c2ffd85b
parent1dd599ddfcdb547bee49bd7d86acddf64c675b42 (diff)
downloadbitbake-efa44d04137977f883db4a643b0f774e91514722.tar.gz
fetch/git: Fix uri in git checkstatus
Pass proper repository url without arguments after a semicolon. Executing checkuri on a rule with git repository in SRC_URI does not report errors when working offline because wrong repository url is passed to the ls-remote command. For example "bitbake -c checkuri glibc" command executes: "git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git;branch=release/2.21/master" command in a shell subprocess to determine if url is valid. Shell subprocess executes in fact 2 commands: "git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git" and "branch=release/2.21/master" First one returns 127 or 128 depending on error but second one returns 0 because it is just env variable setup. Therefore we're not catching connection error. [YOCTO #7558] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/git.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 2643cda78..45bdec055 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -399,9 +399,8 @@ class Git(FetchMethod):
return ud.revisions[name]
def checkstatus(self, ud, d):
- fetchcmd = "%s ls-remote %s" % (ud.basecmd, ud.url)
try:
- runfetchcmd(fetchcmd, d, quiet=True)
+ self._lsremote(ud, d, "")
return True
except FetchError:
return False