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/repo.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/repo.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/repo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py index ecc6e68e97..bfd4ae16aa 100644 --- a/bitbake/lib/bb/fetch2/repo.py +++ b/bitbake/lib/bb/fetch2/repo.py | |||
@@ -51,17 +51,17 @@ class Repo(FetchMethod): | |||
51 | if not ud.manifest.endswith('.xml'): | 51 | if not ud.manifest.endswith('.xml'): |
52 | ud.manifest += '.xml' | 52 | ud.manifest += '.xml' |
53 | 53 | ||
54 | ud.localfile = data.expand("repo_%s%s_%s_%s.tar.gz" % (ud.host, ud.path.replace("/", "."), ud.manifest, ud.branch), d) | 54 | ud.localfile = d.expand("repo_%s%s_%s_%s.tar.gz" % (ud.host, ud.path.replace("/", "."), ud.manifest, ud.branch)) |
55 | 55 | ||
56 | def download(self, ud, d): | 56 | def download(self, ud, d): |
57 | """Fetch url""" | 57 | """Fetch url""" |
58 | 58 | ||
59 | if os.access(os.path.join(data.getVar("DL_DIR", d, True), ud.localfile), os.R_OK): | 59 | if os.access(os.path.join(d.getVar("DL_DIR", True), ud.localfile), os.R_OK): |
60 | logger.debug(1, "%s already exists (or was stashed). Skipping repo init / sync.", ud.localpath) | 60 | logger.debug(1, "%s already exists (or was stashed). Skipping repo init / sync.", ud.localpath) |
61 | return | 61 | return |
62 | 62 | ||
63 | gitsrcname = "%s%s" % (ud.host, ud.path.replace("/", ".")) | 63 | gitsrcname = "%s%s" % (ud.host, ud.path.replace("/", ".")) |
64 | repodir = data.getVar("REPODIR", d, True) or os.path.join(data.getVar("DL_DIR", d, True), "repo") | 64 | repodir = d.getVar("REPODIR", True) or os.path.join(d.getVar("DL_DIR", True), "repo") |
65 | codir = os.path.join(repodir, gitsrcname, ud.manifest) | 65 | codir = os.path.join(repodir, gitsrcname, ud.manifest) |
66 | 66 | ||
67 | if ud.user: | 67 | if ud.user: |