diff options
author | Marcin SmoczyĆski <marcin.smoczynski@enigma.com.pl> | 2015-04-02 14:24:51 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-28 09:44:19 +0100 |
commit | 5ce20aeb026613f6575dcf6468eeb9a9477c9eae (patch) | |
tree | cf02c5fb1ac9e3b4a142abf9c614adc235344ad0 /bitbake | |
parent | 9c245f1d7919e5c8109a8f06f02b894e02f61cba (diff) | |
download | poky-5ce20aeb026613f6575dcf6468eeb9a9477c9eae.tar.gz |
bitbake: 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]
(Bitbake rev: cb8224f0c73c06879783665e2de39ecca7f6a350)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 0fd9beee19..ac9d86893e 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -395,9 +395,8 @@ class Git(FetchMethod): | |||
395 | return ud.revisions[name] | 395 | return ud.revisions[name] |
396 | 396 | ||
397 | def checkstatus(self, ud, d): | 397 | def checkstatus(self, ud, d): |
398 | fetchcmd = "%s ls-remote %s" % (ud.basecmd, ud.url) | ||
399 | try: | 398 | try: |
400 | runfetchcmd(fetchcmd, d, quiet=True) | 399 | self._lsremote(ud, d, "") |
401 | return True | 400 | return True |
402 | except FetchError: | 401 | except FetchError: |
403 | return False | 402 | return False |