diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-16 11:19:01 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-23 10:59:56 +0000 |
| commit | 8de811ae76f8a5bc160e3e3f72da3a5e08b6ca1a (patch) | |
| tree | d05237b14523de16c128de71d99eed4f8f9e554e /bitbake/lib/bb/fetch2/local.py | |
| parent | 4d8ee55164303544c9cf9c9356448cbc79885815 (diff) | |
| download | poky-8de811ae76f8a5bc160e3e3f72da3a5e08b6ca1a.tar.gz | |
bitbake: lib/bb: Don't use deprecated bb.data.getVar/setVar API
The old style bb.data.getVar/setVar API is obsolete. Most of bitbake
doesn't use it but there were some pieces that escaped conversion. This
patch fixes the remaining users mostly in the fetchers.
(Bitbake rev: ff7892fa808116acc1ac50effa023a4cb031a5fc)
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.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/local.py b/bitbake/lib/bb/fetch2/local.py index 51ca78d12b..5adfd5d448 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 = data.getVar('FILESPATH', d, True) | 66 | filespath = d.getVar('FILESPATH', True) |
| 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 = data.getVar('FILESDIR', d, True) | 72 | filesdir = d.getVar('FILESDIR', True) |
| 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) |
| @@ -100,10 +100,10 @@ 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 = data.getVar('FILESPATH', d, True) | 103 | filespath = d.getVar('FILESPATH', True) |
| 104 | if filespath: | 104 | if filespath: |
| 105 | locations = filespath.split(":") | 105 | locations = filespath.split(":") |
| 106 | filesdir = data.getVar('FILESDIR', d, True) | 106 | filesdir = d.getVar('FILESDIR', True) |
| 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", True)) |
