diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/externalsrc.bbclass | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index 4e429d78d8..e372392801 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass @@ -47,6 +47,20 @@ 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 = d.getVarFlag(task, 'cleandirs', False) + if cleandirs: + cleandirs = cleandirs.split() + setvalue = False + if '${S}' in cleandirs: + cleandirs.remove('${S}') + setvalue = True + if externalsrcbuild == externalsrc and '${B}' in cleandirs: + cleandirs.remove('${B}') + setvalue = True + if setvalue: + d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs)) + for task in d.getVar("SRCTREECOVEREDTASKS", True).split(): bb.build.deltask(task, d) |