All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Fixes for fetcher cwd changes
@ 2016-08-10 17:08 Matt Madison
  2016-08-10 17:08 ` [PATCH v2] fetch2: preserve current working directory Matt Madison
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Madison @ 2016-08-10 17:08 UTC (permalink / raw)
  To: bitbake-devel

Here is a more complete patch to fix the working directory changes in
fetcher methods.  In most cases, the pattern was an os.chdir() call
followed by a runfetchcmd or other subprocess call, so I updated
runfetchcmd to take an extra keyword argument to set the cwd of the
child process.  For the remaining cases, the cwd is saved and restored.

The only exceptions are the try_mirror* methods, which look like
they're only used internally by other methods, and those callers
have been updated to preserve cwd.

This fixes my original issue with bitbake reporting 'changed cwd'
warnings from setscene tasks, and also fixes the bitbake-selftest
failures with my first patch (which were cause by dangling cwd
changes to temporary directories that got wiped after test cases
were finished).


Matt Madison (1):
  fetch2: preserve current working directory

 lib/bb/fetch2/__init__.py  | 21 +++++++++++----------
 lib/bb/fetch2/bzr.py       | 11 ++++-------
 lib/bb/fetch2/clearcase.py |  6 ++----
 lib/bb/fetch2/cvs.py       | 15 ++++++++-------
 lib/bb/fetch2/git.py       | 45 ++++++++++++++++++++-------------------------
 lib/bb/fetch2/gitannex.py  | 24 +++++++++++-------------
 lib/bb/fetch2/gitsm.py     | 23 ++++++++++-------------
 lib/bb/fetch2/hg.py        | 28 ++++++++++------------------
 lib/bb/fetch2/npm.py       | 22 +++++++---------------
 lib/bb/fetch2/osc.py       | 10 ++++------
 lib/bb/fetch2/perforce.py  |  6 ++----
 lib/bb/fetch2/repo.py      | 13 ++++++-------
 lib/bb/fetch2/svn.py       | 13 +++++--------
 13 files changed, 100 insertions(+), 137 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-21 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 17:08 [PATCH v2] Fixes for fetcher cwd changes Matt Madison
2016-08-10 17:08 ` [PATCH v2] fetch2: preserve current working directory Matt Madison
2016-08-20 15:10   ` Richard Purdie
2016-08-21 13:09     ` Matt Madison

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.