Bug 8621 - EXPORT_FUNCTIONS on fakeroot task function doesn't actually end up as a fakeroot task
Summary: EXPORT_FUNCTIONS on fakeroot task function doesn't actually end up as a faker...
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Low minor
Target Milestone: Future
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
: 14631 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-31 21:56 UTC by Paul Eggleton
Modified: 2022-04-14 11:48 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2015-10-31 21:56:08 UTC
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.
Comment 1 Randy MacLeod 2020-01-23 16:16:19 UTC
Trevor to talk with Richard about this since Richard knows where the fix belongs.
Comment 2 Ross Burton 2021-11-16 17:47:43 UTC
*** Bug 14631 has been marked as a duplicate of this bug. ***
Comment 3 Richard Purdie 2021-11-16 17:59:41 UTC
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")
Comment 4 Richard Purdie 2022-04-11 20:42:30 UTC
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.
Comment 5 Richard Purdie 2022-04-12 21:29:39 UTC
Issue addressed and patch in review