[poky] Exception in sstate_cleanall() results in the failure of task do_clean

Lu, Lianhao lianhao.lu at intel.com
Thu May 26 05:14:35 PDT 2011


Hi guys,

I recently ran into a do_clean failure using the following scenario:

1. set PACKAGE_CLASSES to 'package_ipk' in local.conf
2. bitbake foo
3. set PACKAGE_CLASSES to 'package_rpm' in local.conf
4. bitbake foo -c clean

The do_clean in step 4 failed without printing any useful information. I dug into a little bit, and found the failure was caused by an exception in the function sstate_cleanall() :

  for manifest in (os.listdir(manifest_dir)):
        if fnmatch.fnmatch(manifest, manifest_pattern):
             name = manifest.replace(manifest_pattern[:-1], "")
             namemap = d.getVar('SSTATETASKNAMES', True).split()
             tasks = d.getVar('SSTATETASKS', True).split()
             taskname = tasks[namemap.index(name)]
             shared_state = sstate_state_fromvars(d, taskname[3:])
             sstate_clean(shared_state, d)

This code snippet tries to find the matching manifest files in minfest dir, then trying to get the task specific shared_state corresponding to the matching manifest file. The problem is when finding the shared_state for manifest file of deploy_ipk(generated because of step 1), the python code "namemap.index(name)" would throw out an exception because the SSTATETASKNAMES doesn't have that value(because of step 3). This would result the failure.

I'm just wondering is it intentional? Or should it just skip the non-exists deploy_ipk task and continue to clean by other manifest files?

Best Regards,
-Lianhao



More information about the poky mailing list