diff options
-rw-r--r-- | meta/classes/sstate.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index efb0096c70..9f059a04a0 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -423,8 +423,9 @@ def sstate_clean_cachefile(ss, d): import oe.path sstatepkgfile = d.getVar('SSTATE_PATHSPEC') + "*_" + ss['task'] + ".tgz*" - bb.note("Removing %s" % sstatepkgfile) - oe.path.remove(sstatepkgfile) + if d.getVarFlag('do_%s' % ss['task'], 'task'): + bb.note("Removing %s" % sstatepkgfile) + oe.path.remove(sstatepkgfile) def sstate_clean_cachefiles(d): for task in (d.getVar('SSTATETASKS') or "").split(): |