summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/local.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/local.py')
-rw-r--r--bitbake/lib/bb/fetch2/local.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py
index e7d1c8c58f..7d7668110e 100644
--- a/bitbake/lib/bb/fetch2/local.py
+++ b/bitbake/lib/bb/fetch2/local.py
@@ -41,9 +41,9 @@ class Local(FetchMethod):
"""
Return the local filename of a given url assuming a successful fetch.
"""
- return self.localpaths(urldata, d)[-1]
+ return self.localfile_searchpaths(urldata, d)[-1]
- def localpaths(self, urldata, d):
+ def localfile_searchpaths(self, urldata, d):
"""
Return the local filename of a given url assuming a successful fetch.
"""
@@ -51,18 +51,14 @@ class Local(FetchMethod):
path = urldata.decodedurl
newpath = path
if path[0] == "/":
+ logger.debug2("Using absolute %s" % (path))
return [path]
filespath = d.getVar('FILESPATH')
if filespath:
logger.debug2("Searching for %s in paths:\n %s" % (path, "\n ".join(filespath.split(":"))))
newpath, hist = bb.utils.which(filespath, path, history=True)
+ logger.debug2("Using %s for %s" % (newpath, path))
searched.extend(hist)
- if not os.path.exists(newpath):
- dldirfile = os.path.join(d.getVar("DL_DIR"), path)
- logger.debug2("Defaulting to %s for %s" % (dldirfile, path))
- bb.utils.mkdirhier(os.path.dirname(dldirfile))
- searched.append(dldirfile)
- return searched
return searched
def need_update(self, ud, d):
@@ -78,9 +74,7 @@ class Local(FetchMethod):
filespath = d.getVar('FILESPATH')
if filespath:
locations = filespath.split(":")
- locations.append(d.getVar("DL_DIR"))
-
- msg = "Unable to find file " + urldata.url + " anywhere. The paths that were searched were:\n " + "\n ".join(locations)
+ msg = "Unable to find file " + urldata.url + " anywhere to download to " + urldata.localpath + ". The paths that were searched were:\n " + "\n ".join(locations)
raise FetchError(msg)
return True