summaryrefslogtreecommitdiff
path: root/meta/classes/utils.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-04 13:20:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 09:06:37 +0000
commit984e90f4d71d866580131c4927b0a77baf1bb9bd (patch)
treeadfe717341c87f2719990a962951492b65c03c1c /meta/classes/utils.bbclass
parentca7adf75295c2a6041b891bfa61e0b4bc2f7c860 (diff)
downloadopenembedded-core-984e90f4d71d866580131c4927b0a77baf1bb9bd.tar.gz
openembedded-core-984e90f4d71d866580131c4927b0a77baf1bb9bd.tar.bz2
openembedded-core-984e90f4d71d866580131c4927b0a77baf1bb9bd.zip
meta/classes: Update classes to use new fetcher API
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/utils.bbclass')
-rw-r--r--meta/classes/utils.bbclass11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 4d4b9953e2..455b49d54a 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -51,11 +51,12 @@ def machine_paths(d):
def is_machine_specific(d):
"""Determine whether the current recipe is machine specific"""
machinepaths = set(machine_paths(d))
- urldatadict = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True)
- for urldata in (urldata for urldata in urldatadict.itervalues()
- if urldata.type == "file"):
- if any(urldata.localpath.startswith(mp + "/") for mp in machinepaths):
- return True
+ srcuri = d.getVar("SRC_URI", True).split()
+ for url in srcuri:
+ fetcher = bb.fetch2.Fetch([srcuri], d)
+ if url.startswith("file://"):
+ if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths):
+ return True
def oe_popen_env(d):
env = d.getVar("__oe_popen_env", False)