FAKEROOT contains the fakeroot command to be run. This should not be set for
those using pseudo + FAKEROOTENV, but should be set for people like upstream
OE, and its value should be 'fakeroot' for them, for compatibility with the
old mechanisms.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
import os
import sys
import logging
+import shlex
import bb
import bb.msg
import bb.process
adir = None
ispython = flags.get('python')
- if flags.get('fakeroot') and not flags.get('task'):
- bb.fatal("Function %s specifies fakeroot but isn't a task?!" % func)
lockflag = flags.get('lockfiles')
if lockflag:
os.chmod(runfile, 0775)
cmd = runfile
+ if d.getVarFlag(function, 'fakeroot'):
+ fakerootcmd = d.getVar('FAKEROOT', True)
+ if fakerootcmd:
+ cmd = [fakerootcmd, runfile]
if logger.isEnabledFor(logging.DEBUG):
logfile = LogTee(logger, sys.stdout)