All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't run bitbake with su -c
@ 2013-05-16  9:03 Michael
  2013-05-19  9:33 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Michael @ 2013-05-16  9:03 UTC (permalink / raw)
  To: bitbake-devel

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

In previous BitBake-Versions (about 1.10.0) it was possible to call
BitBake this way.

Any ideas how do fix this issue?

Thanks in advance!

Michael




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

* Re: Can't run bitbake with su -c
  2013-05-16  9:03 Can't run bitbake with su -c Michael
@ 2013-05-19  9:33 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2013-05-19  9:33 UTC (permalink / raw)
  To: Michael; +Cc: bitbake-devel

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




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

end of thread, other threads:[~2013-05-19  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-16  9:03 Can't run bitbake with su -c Michael
2013-05-19  9:33 ` Richard Purdie

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.