[bitbake-devel] [PATCH v2] fetch2: preserve current working directory

Matt Madison matt at madison.systems
Sun Aug 21 13:09:59 UTC 2016


On Sat, Aug 20, 2016 at 8:10 AM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> On Wed, 2016-08-10 at 10:08 -0700, Matt Madison wrote:
>> Fix the methods in all fetchers so they don't change
>> the current working directory of the calling process, which
>> could lead to "changed cwd" warnings from bitbake.
>>
>> Signed-off-by: Matt Madison <matt at madison.systems>
>> ---
>>  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(-)
>
> Thanks for this, sorry it took a while to merge. It does looks like a
> pretty good cleanup of this code and is much appreciated!

No problem, I figured it would take some time.

> I did wonder if we still needed the try_mirror chdir now we've cleaned
> up the individual fetchers?

I'll check into it and send out a follow-up patch to remove the
remaining chdir's and getcwd's.

Thanks,
-Matt

>
> Cheers,
>
> Richard



More information about the bitbake-devel mailing list