diff options
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 1e041a2a3e..e85d7c4f3e 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -153,8 +153,6 @@ def exec_func(func, d, dirs = None): | |||
153 | bb.utils.mkdirhier(adir) | 153 | bb.utils.mkdirhier(adir) |
154 | 154 | ||
155 | ispython = flags.get('python') | 155 | ispython = flags.get('python') |
156 | if flags.get('fakeroot') and not flags.get('task'): | ||
157 | bb.fatal("Function %s specifies fakeroot but isn't a task?!" % func) | ||
158 | 156 | ||
159 | lockflag = flags.get('lockfiles') | 157 | lockflag = flags.get('lockfiles') |
160 | if lockflag: | 158 | if lockflag: |
@@ -223,9 +221,9 @@ def exec_func_shell(function, d, runfile, cwd=None): | |||
223 | 221 | ||
224 | with open(runfile, 'w') as script: | 222 | with open(runfile, 'w') as script: |
225 | script.write('#!/bin/sh -e\n') | 223 | script.write('#!/bin/sh -e\n') |
226 | if bb.msg.loggerDefaultVerbose: | ||
227 | script.write("set -x\n") | ||
228 | data.emit_func(function, script, d) | 224 | data.emit_func(function, script, d) |
225 | |||
226 | script.write("set -x\n") | ||
229 | if cwd: | 227 | if cwd: |
230 | script.write("cd %s\n" % cwd) | 228 | script.write("cd %s\n" % cwd) |
231 | script.write("%s\n" % function) | 229 | script.write("%s\n" % function) |
@@ -233,6 +231,10 @@ def exec_func_shell(function, d, runfile, cwd=None): | |||
233 | os.chmod(runfile, 0775) | 231 | os.chmod(runfile, 0775) |
234 | 232 | ||
235 | cmd = runfile | 233 | cmd = runfile |
234 | if d.getVarFlag(function, 'fakeroot'): | ||
235 | fakerootcmd = d.getVar('FAKEROOT', True) | ||
236 | if fakerootcmd: | ||
237 | cmd = [fakerootcmd, runfile] | ||
236 | 238 | ||
237 | if bb.msg.loggerDefaultVerbose: | 239 | if bb.msg.loggerDefaultVerbose: |
238 | logfile = LogTee(logger, sys.stdout) | 240 | logfile = LogTee(logger, sys.stdout) |