[bitbake-devel] [PATCH 1/1] cooker.py: change working dir before use pyinotify
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Apr 24 10:25:56 UTC 2015
On Tue, 2015-04-21 at 02:07 -0700, Robert Yang wrote:
> Fixed:
> $ cd tmp/work/core2-64-poky-linux/bash/4.3-r1
> $ bitbake bash -cclean
>
> ERROR: Running idle function
> Traceback (most recent call last):
> File "/buildarea/lyang1/poky/bitbake/lib/pyinotify.py", line 1317, in Notifier.process_events():
> continue
> > revent = self._sys_proc_fun(raw_event) # system processings
> if watch_ and watch_.proc_fun:
> File "/buildarea/lyang1/poky/bitbake/lib/pyinotify.py", line 686, in _SysProcessEvent.__call__(event=<_RawEvent cookie=0 mask=0x40000200 name=build wd=5 >):
> # 3- default call method process_default
> > return self.process_default(event)
>
> File "/buildarea/lyang1/poky/bitbake/lib/pyinotify.py", line 897, in _SysProcessEvent.process_default(raw_event=<_RawEvent cookie=0 mask=0x40000200 name=build wd=5 >, to_append=None):
> dict_.update(to_append)
> > return Event(dict_)
>
> File "/buildarea/lyang1/poky/bitbake/lib/pyinotify.py", line 628, in Event.__init__(raw={'path': '.', 'wd': 5, 'mask': 1073742336, 'name': 'build', 'dir': True}):
> self.pathname = os.path.abspath(os.path.join(self.path,
> > self.name))
> else:
> File "/usr/lib/python2.7/posixpath.py", line 347, in abspath(path='./build'):
> else:
> > cwd = os.getcwd()
> path = join(cwd, path)
> OSError: [Errno 2] No such file or directory
>
> And we can't run bitbake again:
> ERROR: Only one copy of bitbake should be run against a build directory
>
> Chaneg working dir to TOPDIR rather than the dir which runs the command
> will fix the problem. Move self.initConfigurationData ahead, otherwise,
> there is no self.data.
>
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
> bitbake/lib/bb/cooker.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index 9c101f2..678a2f7 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -121,6 +121,9 @@ class BBCooker:
>
> self.configuration = configuration
>
> + self.initConfigurationData()
> + os.chdir(self.data.expand('${TOPDIR}'))
data.getVar("TOPDIR", True) please ;-)
Cheers,
Richard
More information about the bitbake-devel
mailing list