All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <yocto@yoctoproject.org>
Cc: Konrad.Scherer@windriver.com, paul.eggleton@linux.intel.com
Subject: [PATCH V3 05/11] recipeparse.py: restore cwd when the parsing is done
Date: Thu, 1 Jun 2017 23:28:42 -0700	[thread overview]
Message-ID: <8dc2f0d5e1d3aa65a8663f81eaf7bef89ff97b5f.1496384657.git.liezhi.yang@windriver.com> (raw)
In-Reply-To: <cover.1496384657.git.liezhi.yang@windriver.com>

Othewise it may cause troubles to the function who calls it.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 layerindex/recipeparse.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/layerindex/recipeparse.py b/layerindex/recipeparse.py
index dd85bc3..f2a5235 100644
--- a/layerindex/recipeparse.py
+++ b/layerindex/recipeparse.py
@@ -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):
-- 
2.10.2



  parent reply	other threads:[~2017-06-02  6:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  6:28 [PATCH V3 00/11] Several fixes for layerindex Robert Yang
2017-06-02  6:28 ` [PATCH V3 01/11] layerconfparse.py: remove unused layerbranch from parse_layer() Robert Yang
2017-06-02  6:28 ` [PATCH V3 02/11] utils.py: remove obsolete dependencies Robert Yang
2017-06-02  6:28 ` [PATCH V3 03/11] update_layer.py: set layerbranch's collection before add_dependencies Robert Yang
2017-06-02  6:28 ` [PATCH V3 04/11] update.py: fix -l option Robert Yang
2017-06-02  6:28 ` Robert Yang [this message]
2017-06-02  6:28 ` [PATCH V3 06/11] update.py: update layers orderly Robert Yang
2017-06-02  6:28 ` [PATCH V3 07/11] update_layer.py: remove --update-dependencies Robert Yang
2017-06-02  6:28 ` [PATCH V3 08/11] update.py: add option -a to update actual branch Robert Yang
2017-06-02  6:28 ` [PATCH V3 09/11] update_layer.py: move the location of transaction.atomic() Robert Yang
2017-06-02  6:38 ` [PATCH V3 10/11] update.py: add -p to git fetch Robert Yang
2017-06-02  6:38 ` [PATCH V3 11/11] update_layer.py: delete layerbranch for non-existed branch Robert Yang
2017-06-09  6:42 ` [PATCH V3 00/11] Several fixes for layerindex Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8dc2f0d5e1d3aa65a8663f81eaf7bef89ff97b5f.1496384657.git.liezhi.yang@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=Konrad.Scherer@windriver.com \
    --cc=paul.eggleton@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.