summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/local.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-11-25 15:28:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:09 +0000
commit1fce7ecbbb004a5ad82da3eef79cfd52b276708d (patch)
treedc19c8ecb8e0b04ba5eafd27a7679bb55585a868 /bitbake/lib/bb/fetch2/local.py
parent1d0c124cdf0282b8d139063409e40982f0ec9888 (diff)
downloadpoky-1fce7ecbbb004a5ad82da3eef79cfd52b276708d.tar.gz
bitbake: bitbake: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/local.py')
-rw-r--r--bitbake/lib/bb/fetch2/local.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index 5adfd5d448..83778883e0 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -63,13 +63,13 @@ class Local(FetchMethod):
63 newpath = path 63 newpath = path
64 if path[0] == "/": 64 if path[0] == "/":
65 return [path] 65 return [path]
66 filespath = d.getVar('FILESPATH', True) 66 filespath = d.getVar('FILESPATH')
67 if filespath: 67 if filespath:
68 logger.debug(2, "Searching for %s in paths:\n %s" % (path, "\n ".join(filespath.split(":")))) 68 logger.debug(2, "Searching for %s in paths:\n %s" % (path, "\n ".join(filespath.split(":"))))
69 newpath, hist = bb.utils.which(filespath, path, history=True) 69 newpath, hist = bb.utils.which(filespath, path, history=True)
70 searched.extend(hist) 70 searched.extend(hist)
71 if not newpath: 71 if not newpath:
72 filesdir = d.getVar('FILESDIR', True) 72 filesdir = d.getVar('FILESDIR')
73 if filesdir: 73 if filesdir:
74 logger.debug(2, "Searching for %s in path: %s" % (path, filesdir)) 74 logger.debug(2, "Searching for %s in path: %s" % (path, filesdir))
75 newpath = os.path.join(filesdir, path) 75 newpath = os.path.join(filesdir, path)
@@ -81,7 +81,7 @@ class Local(FetchMethod):
81 logger.debug(2, "Searching for %s in path: %s" % (path, newpath)) 81 logger.debug(2, "Searching for %s in path: %s" % (path, newpath))
82 return searched 82 return searched
83 if not os.path.exists(newpath): 83 if not os.path.exists(newpath):
84 dldirfile = os.path.join(d.getVar("DL_DIR", True), path) 84 dldirfile = os.path.join(d.getVar("DL_DIR"), path)
85 logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path)) 85 logger.debug(2, "Defaulting to %s for %s" % (dldirfile, path))
86 bb.utils.mkdirhier(os.path.dirname(dldirfile)) 86 bb.utils.mkdirhier(os.path.dirname(dldirfile))
87 searched.append(dldirfile) 87 searched.append(dldirfile)
@@ -100,13 +100,13 @@ class Local(FetchMethod):
100 # no need to fetch local files, we'll deal with them in place. 100 # no need to fetch local files, we'll deal with them in place.
101 if self.supports_checksum(urldata) and not os.path.exists(urldata.localpath): 101 if self.supports_checksum(urldata) and not os.path.exists(urldata.localpath):
102 locations = [] 102 locations = []
103 filespath = d.getVar('FILESPATH', True) 103 filespath = d.getVar('FILESPATH')
104 if filespath: 104 if filespath:
105 locations = filespath.split(":") 105 locations = filespath.split(":")
106 filesdir = d.getVar('FILESDIR', True) 106 filesdir = d.getVar('FILESDIR')
107 if filesdir: 107 if filesdir:
108 locations.append(filesdir) 108 locations.append(filesdir)
109 locations.append(d.getVar("DL_DIR", True)) 109 locations.append(d.getVar("DL_DIR"))
110 110
111 msg = "Unable to find file " + urldata.url + " anywhere. The paths that were searched were:\n " + "\n ".join(locations) 111 msg = "Unable to find file " + urldata.url + " anywhere. The paths that were searched were:\n " + "\n ".join(locations)
112 raise FetchError(msg) 112 raise FetchError(msg)