From: Mark Hatle Date: Fri, 1 Apr 2011 21:30:11 +0000 (-0500) Subject: build.py: Merge fakeroot changes from Poky X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee39de6856b628df792c4a56966528796fbe2c8e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Chris Larson --- diff --git a/lib/bb/build.py b/lib/bb/build.py index 2036ca475bc..c81dd67fd52 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)