]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
build.py: Merge fakeroot changes from Poky
authorMark Hatle <mark.hatle@windriver.com>
Fri, 1 Apr 2011 21:30:11 +0000 (16:30 -0500)
committerChris Larson <chris_larson@mentor.com>
Fri, 1 Apr 2011 21:53:11 +0000 (14:53 -0700)
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>
lib/bb/build.py

index 2036ca475bcd813e37a8370a0d326d7ba2f00858..c81dd67fd523d19dfddcec5f3ade134f4e88d6eb 100644 (file)
@@ -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)