diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-04-01 16:30:11 -0500 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2011-04-01 14:53:11 -0700 |
commit | ee39de6856b628df792c4a56966528796fbe2c8e (patch) | |
tree | 2331988731c797873449fb536b63989ec024c1e0 | |
parent | 278fb41793343eb7c4c801242e6a0dda5aebbbaf (diff) | |
download | bitbake-ee39de6856b628df792c4a56966528796fbe2c8e.tar.gz |
build.py: Merge fakeroot changes from Poky
Changes imported from poky repository, master branch as of commit:
bcc817ee058bbab91d6e88a3e1e867a4ff09aeca
In Poky fakeroot processing is handled exclusively by FAKEROOTENV. The
fakeroot binary itself is never invoked directly. (This is due to Poky
using pseudo, a fakeroot replacement that is more efficiently run by
setting environment variables.)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r-- | lib/bb/build.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py index 2036ca475..c81dd67fd 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -152,7 +152,8 @@ def exec_func(func, d, dirs = None): adir = None ispython = flags.get('python') - fakeroot = flags.get('fakeroot') + 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: @@ -168,7 +169,7 @@ def exec_func(func, d, dirs = None): if ispython: exec_func_python(func, d, runfile, cwd=adir) else: - exec_func_shell(func, d, runfile, cwd=adir, fakeroot=fakeroot) + exec_func_shell(func, d, runfile, cwd=adir) _functionfmt = """ def {function}(d): @@ -208,7 +209,7 @@ def exec_func_python(func, d, runfile, cwd=None): except OSError: pass -def exec_func_shell(function, d, runfile, cwd=None, fakeroot=False): +def exec_func_shell(function, d, runfile, cwd=None): """Execute a shell function from the metadata Note on directory behavior. The 'dirs' varflag should contain a list @@ -230,10 +231,7 @@ def exec_func_shell(function, d, runfile, cwd=None, fakeroot=False): os.chmod(runfile, 0775) - if fakeroot: - cmd = ['fakeroot', runfile] - else: - cmd = runfile + cmd = runfile if logger.isEnabledFor(logging.DEBUG): logfile = LogTee(logger, sys.stdout) |