summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/parse/parse_py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py6
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py11
2 files changed, 10 insertions, 7 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 20fa60355e..5f8426df24 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -400,14 +400,14 @@ def set_additional_vars(file, d, include):
from bb import fetch
try:
- fetch.init(src_uri.split(), d)
+ ud = fetch.init(src_uri.split(), d)
+ a += fetch.localpaths(d, ud)
except fetch.NoMethodError:
pass
except bb.MalformedUrl,e:
raise ParseError("Unable to generate local paths for SRC_URI due to malformed uri: %s" % e)
-
- a += fetch.localpaths(d)
del fetch
+
data.setVar('A', " ".join(a), d)
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
index 0e05928d84..6a44e28e90 100644
--- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py
@@ -45,14 +45,17 @@ def localpath(fn, d):
if os.path.exists(fn):
return fn
+ if "://" not in fn:
+ return fn
+
localfn = None
try:
- localfn = bb.fetch.localpath(fn, d)
+ localfn = bb.fetch.localpath(fn, d, False)
except bb.MalformedUrl:
pass
if not localfn:
- localfn = fn
+ return fn
return localfn
def obtain(fn, data):
@@ -67,14 +70,14 @@ def obtain(fn, data):
return localfn
bb.mkdirhier(dldir)
try:
- bb.fetch.init([fn])
+ ud = bb.fetch.init([fn], data, False)
except bb.fetch.NoMethodError:
(type, value, traceback) = sys.exc_info()
bb.msg.debug(1, bb.msg.domain.Parsing, "obtain: no method: %s" % value)
return localfn
try:
- bb.fetch.go(data)
+ bb.fetch.go(data, ud)
except bb.fetch.MissingParameterError:
(type, value, traceback) = sys.exc_info()
bb.msg.debug(1, bb.msg.domain.Parsing, "obtain: missing parameters: %s" % value)