]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
externalsrc/devtool: Fix to work with fixed export funcition flags handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 11 Apr 2022 22:02:26 +0000 (23:02 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Apr 2022 08:19:19 +0000 (09:19 +0100)
If we fix bitbake to correctly handle the cleandirs and fakeroot flags
for tasks handled by EXPORT_FUNCTIONS, we break devtool since it only
considers these for top level functions. Add in extra code to intercept
the cleandirs flags for commonly used sub functions too.

[YOCTO #8621]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/externalsrc.bbclass

index abfe24bacec98fb1e1850e648dbebe8d29e17ab5..b2f216f361d18d6651e2f737dc3fc2ad2894d6ea 100644 (file)
@@ -90,15 +90,16 @@ python () {
                 # Since configure will likely touch ${S}, ensure only we lock so one task has access at a time
                 d.appendVarFlag(task, "lockfiles", " ${S}/singletask.lock")
 
-            # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
-            cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 'cleandirs', False) or '')
-            setvalue = False
-            for cleandir in cleandirs[:]:
-                if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
-                    cleandirs.remove(cleandir)
-                    setvalue = True
-            if setvalue:
-                d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs))
+            for funcname in [task, "base_" + task, "kernel_" + task]:
+                # We do not want our source to be wiped out, ever (kernel.bbclass does this for do_clean)
+                cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(funcname, 'cleandirs', False) or '')
+                setvalue = False
+                for cleandir in cleandirs[:]:
+                    if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
+                        cleandirs.remove(cleandir)
+                        setvalue = True
+                if setvalue:
+                    d.setVarFlag(funcname, 'cleandirs', ' '.join(cleandirs))
 
         fetch_tasks = ['do_fetch', 'do_unpack']
         # If we deltask do_patch, there's no dependency to ensure do_unpack gets run, so add one