summaryrefslogtreecommitdiffstats
path: root/meta/classes/utils.bbclass
diff options
context:
space:
mode:
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):
51def is_machine_specific(d): 51def is_machine_specific(d):
52 """Determine whether the current recipe is machine specific""" 52 """Determine whether the current recipe is machine specific"""
53 machinepaths = set(machine_paths(d)) 53 machinepaths = set(machine_paths(d))
54 urldatadict = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True) 54 srcuri = d.getVar("SRC_URI", True).split()
55 for urldata in (urldata for urldata in urldatadict.itervalues() 55 for url in srcuri:
56 if urldata.type == "file"): 56 fetcher = bb.fetch2.Fetch([srcuri], d)
57 if any(urldata.localpath.startswith(mp + "/") for mp in machinepaths): 57 if url.startswith("file://"):
58 return True 58 if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths):
59 return True
59 60
60def oe_popen_env(d): 61def oe_popen_env(d):
61 env = d.getVar("__oe_popen_env", False) 62 env = d.getVar("__oe_popen_env", False)