summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-07-28 22:59:23 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-07-28 22:59:23 +0000
commitfe87eb01957a742d87ed668e9cfd2d7bce64aac5 (patch)
tree580e34170b620dedd483e61c9383cc8e4d2f801b
parent1027cd62c4669e89d89684f920743c3c161846cb (diff)
downloadbitbake-fe87eb01957a742d87ed668e9cfd2d7bce64aac5.tar.gz
Update parser to work optimally with the new fetcher code
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py6
-rw-r--r--lib/bb/parse/parse_py/ConfHandler.py11
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 20fa60355..5f8426df2 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/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/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index 0e05928d8..6a44e28e9 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/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)