summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2011-01-18 23:35:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-25 12:25:47 +0000
commitef918a72de97fd2189e1c8487e371d13e18088fd (patch)
treef19cd59514794dc42bbcc0e459e681cecd101770 /bitbake/lib/bb/fetch2/__init__.py
parente2ac26e7b1a1d058915d489cf3e0985484e1f69e (diff)
downloadpoky-ef918a72de97fd2189e1c8487e371d13e18088fd.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. Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 9df91001d5..886d49afa2 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -294,6 +294,8 @@ def download(d, urls = None):
294 # Next try fetching from the original uri, u 294 # Next try fetching from the original uri, u
295 try: 295 try:
296 m.download(u, ud, d) 296 m.download(u, ud, d)
297 if hasattr(m, "build_mirror_data"):
298 m.build_mirror_data(u, ud, d)
297 localpath = ud.localpath 299 localpath = ud.localpath
298 except FetchError: 300 except FetchError:
299 # Remove any incomplete file 301 # Remove any incomplete file
@@ -500,6 +502,8 @@ def try_mirrors(d, uri, mirrors, check = False, force = False):
500 return found 502 return found
501 else: 503 else:
502 ud.method.download(newuri, ud, ld) 504 ud.method.download(newuri, ud, ld)
505 if hasattr(ud.method,"build_mirror_data"):
506 ud.method.build_mirror_data(newuri, ud, ld)
503 return ud.localpath 507 return ud.localpath
504 except (bb.fetch2.MissingParameterError, 508 except (bb.fetch2.MissingParameterError,
505 bb.fetch2.FetchError, 509 bb.fetch2.FetchError,