diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/local.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/local.py | 12 |
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) |