aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-25 08:50:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-05-25 08:59:58 +0100
commit0eb75a34bd9731e9de7bc9600a7418a927561fdb (patch)
tree0c0e32352698fe541047491050c3b337b9e39988
parent8d1748f75763b4a66516cc46d5457ee6404b1b68 (diff)
downloadbitbake-0eb75a34bd9731e9de7bc9600a7418a927561fdb.tar.gz
cache: Clean up getVar usage to modern syntax/style
No functional change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cache.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index a1dde9642..ef4d660e8 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -659,25 +659,25 @@ class Cache(object):
"""
chdir_back = False
- from bb import data, parse
+ from bb import parse
# expand tmpdir to include this topdir
- data.setVar('TMPDIR', data.getVar('TMPDIR', config, 1) or "", config)
+ config.setVar('TMPDIR', config.getVar('TMPDIR', True) or "")
bbfile_loc = os.path.abspath(os.path.dirname(bbfile))
oldpath = os.path.abspath(os.getcwd())
parse.cached_mtime_noerror(bbfile_loc)
- bb_data = data.init_db(config)
+ bb_data = config.createCopy()
# The ConfHandler first looks if there is a TOPDIR and if not
# then it would call getcwd().
# Previously, we chdir()ed to bbfile_loc, called the handler
# and finally chdir()ed back, a couple of thousand times. We now
# just fill in TOPDIR to point to bbfile_loc if there is no TOPDIR yet.
- if not data.getVar('TOPDIR', bb_data):
+ if not bb_data.getVar('TOPDIR', False):
chdir_back = True
- data.setVar('TOPDIR', bbfile_loc, bb_data)
+ bb_data.setVar('TOPDIR', bbfile_loc)
try:
if appends:
- data.setVar('__BBAPPEND', " ".join(appends), bb_data)
+ bb_data.setVar('__BBAPPEND', " ".join(appends))
bb_data = parse.handle(bbfile, bb_data)
if chdir_back:
os.chdir(oldpath)