From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Robert Yang <liezhi.yang@windriver.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/1] cooker.py: change working dir before use pyinotify
Date: Fri, 24 Apr 2015 11:25:56 +0100 [thread overview]
Message-ID: <1429871156.26983.133.camel@linuxfoundation.org> (raw)
In-Reply-To: <a76c78db62cc1254387c8d4a556f0d8c54df704f.1429607216.git.liezhi.yang@windriver.com>
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@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
next prev parent reply other threads:[~2015-04-24 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 9:07 [PATCH 0/1] cooker.py: change working dir before use pyinotify Robert Yang
2015-04-21 9:07 ` [PATCH 1/1] " Robert Yang
2015-04-24 10:25 ` Richard Purdie [this message]
2015-04-29 5:41 ` Robert Yang
2015-07-06 10:10 ` 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=1429871156.26983.133.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=liezhi.yang@windriver.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox