diff options
author | Yu Ke <ke.yu@intel.com> | 2011-01-18 23:35:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-10 23:36:43 +0000 |
commit | dee27c176a78e8855d7062459f3df6af53de031d (patch) | |
tree | 78d0f7daaa01bc67f6211082d3b5e0313b4be592 /lib/bb/fetch2/__init__.py | |
parent | a8f231507842a8202783276f554ad42ce762c935 (diff) | |
download | bitbake-dee27c176a78e8855d7062459f3df6af53de031d.tar.gz |
git.py: split download to download() and build_mirror_data()
the download is to fetch the source from URL, the build_mirror_data is
to create the mirror tar ball. the original go() method mix them together,
it is more clean to split them.
(From Poky rev: ef918a72de97fd2189e1c8487e371d13e18088fd)
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 9df91001d..886d49afa 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -294,6 +294,8 @@ def download(d, urls = None): # Next try fetching from the original uri, u try: m.download(u, ud, d) + if hasattr(m, "build_mirror_data"): + m.build_mirror_data(u, ud, d) localpath = ud.localpath except FetchError: # Remove any incomplete file @@ -500,6 +502,8 @@ def try_mirrors(d, uri, mirrors, check = False, force = False): return found else: ud.method.download(newuri, ud, ld) + if hasattr(ud.method,"build_mirror_data"): + ud.method.build_mirror_data(newuri, ud, ld) return ud.localpath except (bb.fetch2.MissingParameterError, bb.fetch2.FetchError, |