summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/base.bbclass5
-rw-r--r--meta/classes/sstate.bbclass5
2 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index ec55d4aa7..42291557b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -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)
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 807e8e39a..dbe0e46b5 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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)