summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r--bitbake/lib/bb/cache.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index a1dde96425..ef4d660e85 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -659,25 +659,25 @@ class Cache(object):
659 """ 659 """
660 chdir_back = False 660 chdir_back = False
661 661
662 from bb import data, parse 662 from bb import parse
663 663
664 # expand tmpdir to include this topdir 664 # expand tmpdir to include this topdir
665 data.setVar('TMPDIR', data.getVar('TMPDIR', config, 1) or "", config) 665 config.setVar('TMPDIR', config.getVar('TMPDIR', True) or "")
666 bbfile_loc = os.path.abspath(os.path.dirname(bbfile)) 666 bbfile_loc = os.path.abspath(os.path.dirname(bbfile))
667 oldpath = os.path.abspath(os.getcwd()) 667 oldpath = os.path.abspath(os.getcwd())
668 parse.cached_mtime_noerror(bbfile_loc) 668 parse.cached_mtime_noerror(bbfile_loc)
669 bb_data = data.init_db(config) 669 bb_data = config.createCopy()
670 # The ConfHandler first looks if there is a TOPDIR and if not 670 # The ConfHandler first looks if there is a TOPDIR and if not
671 # then it would call getcwd(). 671 # then it would call getcwd().
672 # Previously, we chdir()ed to bbfile_loc, called the handler 672 # Previously, we chdir()ed to bbfile_loc, called the handler
673 # and finally chdir()ed back, a couple of thousand times. We now 673 # and finally chdir()ed back, a couple of thousand times. We now
674 # just fill in TOPDIR to point to bbfile_loc if there is no TOPDIR yet. 674 # just fill in TOPDIR to point to bbfile_loc if there is no TOPDIR yet.
675 if not data.getVar('TOPDIR', bb_data): 675 if not bb_data.getVar('TOPDIR', False):
676 chdir_back = True 676 chdir_back = True
677 data.setVar('TOPDIR', bbfile_loc, bb_data) 677 bb_data.setVar('TOPDIR', bbfile_loc)
678 try: 678 try:
679 if appends: 679 if appends:
680 data.setVar('__BBAPPEND', " ".join(appends), bb_data) 680 bb_data.setVar('__BBAPPEND', " ".join(appends))
681 bb_data = parse.handle(bbfile, bb_data) 681 bb_data = parse.handle(bbfile, bb_data)
682 if chdir_back: 682 if chdir_back:
683 os.chdir(oldpath) 683 os.chdir(oldpath)