Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Michael <m.meier@plusoptix.de>
To: bitbake-devel@lists.openembedded.org
Subject: Can't run bitbake with su -c
Date: Thu, 16 May 2013 11:03:50 +0200	[thread overview]
Message-ID: <kn27dj$tdo$1@ger.gmane.org> (raw)

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




             reply	other threads:[~2013-05-16  9:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16  9:03 Michael [this message]
2013-05-19  9:33 ` Can't run bitbake with su -c Richard Purdie

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='kn27dj$tdo$1@ger.gmane.org' \
    --to=m.meier@plusoptix.de \
    --cc=bitbake-devel@lists.openembedded.org \
    /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