mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
recipeparse.py: restore cwd when the parsing is done
If we don't restore the current working directory, it may cause trouble for the calling function. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
d689b785c4
commit
e5f718182f
|
@ -70,10 +70,13 @@ def init_parser(settings, branch, bitbakepath, enable_tracking=False, nocheckout
|
|||
if not os.path.exists(settings.TEMP_BASE_DIR):
|
||||
os.makedirs(settings.TEMP_BASE_DIR)
|
||||
tempdir = tempfile.mkdtemp(dir=settings.TEMP_BASE_DIR)
|
||||
saved_cwd = os.getcwd()
|
||||
os.chdir(tempdir)
|
||||
|
||||
tinfoil = utils.setup_tinfoil(bitbakepath, enable_tracking)
|
||||
|
||||
os.chdir(saved_cwd)
|
||||
|
||||
# Ensure TMPDIR exists (or insane.bbclass will blow up trying to write to the QA log)
|
||||
oe_tmpdir = tinfoil.config_data.getVar('TMPDIR', True)
|
||||
if not os.path.exists(oe_tmpdir):
|
||||
|
|
Loading…
Reference in New Issue
Block a user