If you export a task function in a class with EXPORT_FUNCTIONS which is marked fakeroot, the task doesn't end up executing as a fakeroot task. It turns out we never do this in the OE-Core metadata; all of our functions exported with EXPORT_FUNCTIONS that should be fakeroot have that varflag set manually in anonymous python, so that explains why we (apparently) hadn't noticed this.
Trevor to talk with Richard about this since Richard knows where the fix belongs.
*** Bug 14631 has been marked as a duplicate of this bug. ***
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 31bcc8e7ac..ec0305cd37 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py @@ -223,7 +223,7 @@ class ExportFuncsNode(AstNode): for flag in [ "func", "python" ]: if data.getVarFlag(calledfunc, flag, False): data.setVarFlag(func, flag, data.getVarFlag(calledfunc, flag, False)) - for flag in [ "dirs" ]: + for flag in ["dirs", "cleandirs", "fakeroot"]: if data.getVarFlag(func, flag, False): data.setVarFlag(calledfunc, flag, data.getVarFlag(func, flag, False)) data.setVarFlag(func, "filename", "autogenerated")
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3432/steps/14/logs/stdio shows a run with this fix applied on the autobuilder. There is some issue.
Issue addressed and patch in review
https://git.yoctoproject.org/poky/commit/?id=73fa855f6af5ef9c3a78656aa56f09d213601be2