diff options
author | Darren Hart <dvhart@linux.intel.com> | 2011-05-20 16:06:12 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-27 18:27:19 +0100 |
commit | 183ef127f555af68084ab956363b375124dd2a57 (patch) | |
tree | dcafcb0e5f40535cebfba24162bed08df2b0d1f4 /bitbake | |
parent | 5a4b8cef20ce22aebe87721290dd99f25d5bb686 (diff) | |
download | ast2050-yocto-poky-183ef127f555af68084ab956363b375124dd2a57.zip ast2050-yocto-poky-183ef127f555af68084ab956363b375124dd2a57.tar.gz |
fetch2/git: ensure network check log matches actual command
The git command string logged via check_network_access() does not match
the actual command executed in a few places. Ensure that it does.
(Bitbake rev: 10f3ca52dc274cd8b240987cfd7cd003aeda7ab1)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 35a4bfd..6979bea 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -167,8 +167,10 @@ class Git(FetchMethod): # If the repo still doesn't exist, fallback to cloning it if not os.path.exists(ud.clonedir): - bb.fetch2.check_network_access(d, "git clone --bare %s%s" % (ud.host, ud.path)) - runfetchcmd("%s clone --bare %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d) + clone_cmd = "%s clone --bare %s://%s%s%s %s" % \ + (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir) + bb.fetch2.check_network_access(d, clone_cmd) + runfetchcmd(clone_cmd, d) os.chdir(ud.clonedir) # Update the checkout if needed @@ -177,7 +179,6 @@ class Git(FetchMethod): if not self._contains_ref(ud.revisions[name], d): needupdate = True if needupdate: - bb.fetch2.check_network_access(d, "git fetch %s%s" % (ud.host, ud.path), ud.url) try: runfetchcmd("%s remote prune origin" % ud.basecmd, d) runfetchcmd("%s remote rm origin" % ud.basecmd, d) @@ -185,7 +186,9 @@ class Git(FetchMethod): logger.debug(1, "No Origin") runfetchcmd("%s remote add origin %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d) - runfetchcmd("%s fetch --all -t" % ud.basecmd, d) + fetch_cmd = "%s fetch --all -t" % ud.basecmd + bb.fetch2.check_network_access(d, fetch_cmd, ud.url) + runfetchcmd(fetch_cmd, d) runfetchcmd("%s prune-packed" % ud.basecmd, d) runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d) ud.repochanged = True @@ -249,9 +252,10 @@ class Git(FetchMethod): else: username = "" - bb.fetch2.check_network_access(d, "git ls-remote %s%s %s" % (ud.host, ud.path, ud.branches[name])) basecmd = data.getVar("FETCHCMD_git", d, True) or "git" - cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name]) + cmd = "%s ls-remote %s://%s%s%s %s" % \ + (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name]) + bb.fetch2.check_network_access(d, cmd) output = runfetchcmd(cmd, d, True) if not output: raise bb.fetch2.FetchError("The command %s gave empty output unexpectedly" % cmd, url) |