diff options
author | Yu Ke <ke.yu@intel.com> | 2011-01-24 15:56:54 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-25 12:32:50 +0000 |
commit | 029f8584d547c0792ffbe2f83451dcdfe2a3db7f (patch) | |
tree | f5d680b8b72371b1039d5aff6fac1b28eb9d530f /bitbake/lib/bb/fetch2/git.py | |
parent | 098e8ded339f3bf864f3bad9871028176f70b12b (diff) | |
download | openembedded-core-contrib-029f8584d547c0792ffbe2f83451dcdfe2a3db7f.tar.gz |
bitbake/fetch2: Instrument fetchers when making network access
Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index d818c1e6f0..08daa20313 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -124,12 +124,14 @@ class Git(Fetch): # 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 %s%s" % (ud.host, ud.path)) runfetchcmd("%s clone -n %s://%s%s%s %s" % (ud.basecmd, ud.proto, username, ud.host, ud.path, ud.clonedir), d) os.chdir(ud.clonedir) # Update the checkout if needed if not self._contains_ref(ud.tag, d) or 'fullclone' in ud.parm: # Remove all but the .git directory + bb.fetch2.check_network_access(d, "git fetch %s%s" %(ud.host, ud.path)) runfetchcmd("rm * -Rf", d) if 'fullclone' in ud.parm: runfetchcmd("%s fetch --all" % (ud.basecmd), d) @@ -215,6 +217,7 @@ class Git(Fetch): else: username = "" + bb.fetch2.check_network_access(d, "git ls-remote %s%s %s" % (ud.host, ud.path, ud.branch)) 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.branch) output = runfetchcmd(cmd, d, True) |