From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Michael <m.meier@plusoptix.de>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: Can't run bitbake with su -c
Date: Sun, 19 May 2013 12:33:22 +0300 [thread overview]
Message-ID: <1368956002.32727.72.camel@ted> (raw)
In-Reply-To: <kn27dj$tdo$1@ger.gmane.org>
On Thu, 2013-05-16 at 11:03 +0200, Michael wrote:
> Hi all,
>
> if I call BitBake as super user like this: su <user> -c "bitbake
> <recipe>" I get the following traceback:
>
> Traceback (most recent call last):
> File "/usr/bin/bitbake", line 196, in <module>
> ret = main()
> File "/usr/bin/bitbake", line 160, in main
> cooker = bb.cooker.BBCooker(configuration, server)
> File "/usr/lib/python2.7/site-packages/bb/cooker.py", line 90, in __init__
> self.parseConfigurationFiles(self.configuration.file)
> File "/usr/lib/python2.7/site-packages/bb/cooker.py", line 570, in
> parseConfigurationFiles
> data = bb.parse.handle(os.path.join("conf", "bitbake.conf"), data)
> File "/usr/lib/python2.7/site-packages/bb/parse/__init__.py", line 75,
> in handle
> return h['handle'](fn, data, include)
> File
> "/usr/lib/python2.7/site-packages/bb/parse/parse_py/ConfHandler.py",
> line 104, in handle
> statements.eval(data)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 33, in eval
> map(lambda x: x.eval(data), self)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 33, in
> <lambda>
> map(lambda x: x.eval(data), self)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 56, in eval
> bb.parse.ConfHandler.include(self.from_fn, s, data, False)
> File
> "/usr/lib/python2.7/site-packages/bb/parse/parse_py/ConfHandler.py",
> line 66, in include
> ret = handle(fn, data, True)
> File "/usr/lib/python2.7/site-packages/bb/parse/__init__.py", line 75,
> in handle
> return h['handle'](fn, data, include)
> File
> "/usr/lib/python2.7/site-packages/bb/parse/parse_py/ConfHandler.py",
> line 104, in handle
> statements.eval(data)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 33, in eval
> map(lambda x: x.eval(data), self)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 33, in
> <lambda>
> map(lambda x: x.eval(data), self)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 54, in eval
> bb.parse.ConfHandler.include(self.from_fn, s, data, "include required")
> File
> "/usr/lib/python2.7/site-packages/bb/parse/parse_py/ConfHandler.py",
> line 66, in include
> ret = handle(fn, data, True)
> File "/usr/lib/python2.7/site-packages/bb/parse/__init__.py", line 75,
> in handle
> return h['handle'](fn, data, include)
> File
> "/usr/lib/python2.7/site-packages/bb/parse/parse_py/BBHandler.py", line
> 149, in handle
> statements.eval(d)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 33, in eval
> map(lambda x: x.eval(data), self)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 33, in
> <lambda>
> map(lambda x: x.eval(data), self)
> File "/usr/lib/python2.7/site-packages/bb/parse/ast.py", line 92, in eval
> bb.data.update_data(e)
> File "/usr/lib/python2.7/site-packages/bb/data.py", line 486, in
> update_data
> overrides = (getVar('OVERRIDES', d, 1) or "").split(':') or []
> File "/usr/lib/python2.7/site-packages/bb/data.py", line 100, in getVar
> return d.getVar(var,exp)
> File "/usr/lib/python2.7/site-packages/bb/data_smart.py", line 165, in
> getVar
> return self.expand(value,var)
> File "/usr/lib/python2.7/site-packages/bb/data_smart.py", line 82, in
> expand
> s = __expand_var_regexp__.sub(var_sub, s)
> File "/usr/lib/python2.7/site-packages/bb/data_smart.py", line 60, in
> var_sub
> var = self.getVar(key, 1)
> File "/usr/lib/python2.7/site-packages/bb/data_smart.py", line 165, in
> getVar
> return self.expand(value,var)
> File "/usr/lib/python2.7/site-packages/bb/data_smart.py", line 83, in
> expand
> s = __expand_python_regexp__.sub(python_sub, s)
> File "/usr/lib/python2.7/site-packages/bb/data_smart.py", line 69, in
> python_sub
> s = utils.better_eval(codeobj, {"d": self})
> File "/usr/lib/python2.7/site-packages/bb/utils.py", line 360, in
> better_eval
> return eval(source, _context, locals)
> File "PN", line 1, in <module>
> TypeError: getVar() takes exactly 3 arguments (2 given)
>
> I've tried it with BitBake from
> git://github.com/openembedded/bitbake.git, master-branch,
> commit:c47088a86fd8ad06c1810d04d9537c4cd01e8bef as well as commit:
> 782bc0e797802224f06cb6f9098a50d658c86523
Can you do something like a print(source) before this line and see what
code its failing on please?
Cheers,
Richard
prev parent reply other threads:[~2013-05-19 9:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 9:03 Can't run bitbake with su -c Michael
2013-05-19 9:33 ` Richard Purdie [this message]
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=1368956002.32727.72.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=m.meier@plusoptix.de \
/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