Wind River Support Network

HomeDefectsLIN6-3865
Fixed

LIN6-3865 : sstate cache files still referencing old projects

Created: Sep 17, 2013    Updated: Mar 5, 2016
Resolved Date: Dec 4, 2013
Previous ID: LIN5-5374, LIN6-3080
Found In Version: 6.0
Fix Version: 6.0
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Build & Config

Description

Files in the sstate cache are still containing the path to the project in which they were created. This can cause another project to fail to build if the original project has been deleted and/or if the user does not have permissions to access the original project directory.

Errors similar to the following will be seen:

ERROR: Error executing a python function in /work/test/proj/layers/oe-core/meta/recipes-kernel/oprofile/oprofile_0.9.7.bb:
OSError: [Errno 13] Permission denied: '/local'

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File "do_package_write_rpm", line 7, in <module>
ERROR: 
ERROR:   File "do_package_write_rpm", line 4, in do_package_write_rpm
ERROR: 
ERROR:   File "/work/test/proj/bitbake/lib/bb/build.py", line 172, in exec_func
ERROR:     bb.utils.mkdirhier(adir)
ERROR: 
ERROR:   File "/work/test/proj/bitbake/lib/bb/utils.py", line 588, in mkdirhier
ERROR:     raise e
ERROR: 
ERROR: The code that was being executed was:
ERROR:      0003:    bb.build.exec_func("read_subpackage_metadata", d)
ERROR:      0004:    bb.build.exec_func("do_package_rpm", d)
ERROR:      0005:
ERROR:      0006:
ERROR:  *** 0007:do_package_write_rpm(d)
ERROR:      0008:
ERROR: [From file: 'do_package_write_rpm', lineno: 7, function: <module>]
ERROR:      0001:
ERROR:      0002:def do_package_write_rpm(d):
ERROR:      0003:    bb.build.exec_func("read_subpackage_metadata", d)
ERROR:  *** 0004:    bb.build.exec_func("do_package_rpm", d)
ERROR:      0005:
ERROR:      0006:
ERROR:      0007:do_package_write_rpm(d)
ERROR:      0008:
ERROR: [From file: 'do_package_write_rpm', lineno: 4, function: do_package_write_rpm]
ERROR: Function failed: do_package_write_rpm
ERROR: Logfile of failure stored in: /work/test/proj/bitbake_build/tmp/work/x86_64-wrs-linux/oprofile-0.9.7-r2.0/temp/do_package_write_rpm/log.do_package_write_rpm.8800
ERROR: Task 1372 (/work/test/proj/layers/oe-core/meta/recipes-kernel/oprofile/oprofile_0.9.7.bb, do_package_write_rpm) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2562 tasks of which 1143 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /work/test/proj/layers/oe-core/meta/recipes-kernel/oprofile/oprofile_0.9.7.bb, do_package_write_rpm
Summary: There were 2 WARNING messages shown.
Summary: There were 30 ERROR messages shown, returning a non-zero exit code.

Workaround

remove the "bad" package files from the sstate dir

Steps to Reproduce

This required two or more projects configured in the same way and using a shared sstate cache. The first project is used to populate the sstate cache and then the second to use those sstate files.

The problem will not occur with every build, but once a package has been created and placed in the sstate cache (using first project) that will trigger the problem then all subsequent projects (second project and future) will also fail every time until the package files are removed from the sstate dir.
Live chat
Online