Patchwork [1/2] sstate.bbclass: Fix an issue if the config changes

login
register
mail settings
Submitter Mark Hatle
Date June 29, 2011, 1:42 a.m.
Message ID <5d587020e89f331fbd31884d283ceb23756b3c9a.1309311666.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/6639/
State New, archived
Headers show

Comments

Mark Hatle - June 29, 2011, 1:42 a.m.
We need to check if we know of the task type, before we attempt
to process it.  In order to reproduce the problem build with:

PACKAGE_CLASSES = "package_ipk"

Then change it to:

PACKAGE_CLASSES = "package_rpm"

Build again -- and then try bitbake -c cleansstate <recipe>

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/sstate.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 14c90ec..0daaf48 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -273,6 +273,8 @@  python sstate_cleanall() {
              name = manifest.replace(manifest_pattern[:-1], "")
              namemap = d.getVar('SSTATETASKNAMES', True).split()
              tasks = d.getVar('SSTATETASKS', True).split()
+             if name not in namemap:
+                  continue
              taskname = tasks[namemap.index(name)]
              shared_state = sstate_state_fromvars(d, taskname[3:])
              sstate_clean(shared_state, d)