base/sstate.bbclass: Rename fetcher "go" method to "download" when using fetch v2

Signed-off-by: Yu Ke <ke.yu@intel.com>
This commit is contained in:
Yu Ke
2011-01-18 23:17:50 +08:00
committed by Richard Purdie
parent e05918937c
commit e2ac26e7b1
2 changed files with 8 additions and 2 deletions

View File

@@ -135,7 +135,10 @@ python base_do_fetch() {
raise bb.build.FuncFailed("Malformed URL: %s" % value)
try:
bb.fetch.go(localdata)
if bb.fetch.__version__ == "1":
bb.fetch.go(localdata)
else:
bb.fetch.download(localdata)
except bb.fetch.MissingParameterError:
(type, value, traceback) = sys.exc_info()
raise bb.build.FuncFailed("Missing parameters: %s" % value)

View File

@@ -344,7 +344,10 @@ def pstaging_fetch(sstatepkg, d):
# we will build the package
try:
bb.fetch.init([srcuri], localdata)
bb.fetch.go(localdata, [srcuri])
if bb.fetch.__version__ == "1":
bb.fetch.go(localdata, [srcuri])
else:
bb.fetch.download(localdata, [srcuri])
# Need to optimise this, if using file:// urls, the fetcher just changes the local path
# For now work around by symlinking
localpath = bb.data.expand(bb.fetch.localpath(srcuri, localdata), localdata)