diff options
author | 2015-06-09 02:04:46 -0700 | |
---|---|---|
committer | 2015-06-11 23:57:52 +0100 | |
commit | 9099d46a46ee511d1b7e496472c5b973e8e8feaf (patch) | |
tree | c306fe64e14fcc1548f13352a2699b1f99c6324c /meta/recipes-devtools/gcc/gcc-source.inc | |
parent | 70f514719b1bac2a478bc05afd5382b3a26a419a (diff) | |
download | openembedded-core-contrib-9099d46a46ee511d1b7e496472c5b973e8e8feaf.tar.gz |
gcc-source.inc: fix STAMPCLEAN to avoid race issue
Fixed race issue when build more than one gcc-source and inherit
rm_work, for example:
$ bitbake gcc-source-4.9.2 gcc-source-5.1.0
File "/path/to/bitbake/lib/bb/build.py", line 512, in exec_task
return _exec_task(fn, task, d, quieterr)
File "/path/to/bitbake/lib/bb/build.py", line 489, in _exec_task
make_stamp(task, localdata)
File "/path/to/bitbake/lib/bb/build.py", line 599, in make_stamp
os.unlink(name)
OSError: [Errno 2] No such file or directory: '/path/to/tmp/stamps/work-shared/gcc-4.9.2-r0.do_rm_work_all.02cf1ed9b79d4edb0a51d3b913b7f9ba'
This is because make_stamp() uses glob.glob() to remove the old stamps
before create the new one, when gcc-source-5.1.0 removes gcc-4.9.2-r0's
stamp, we may get the error.
We can't use deltask do_rm_work_all as do_rm_work since it is a
recrdeptask, otherwise:
ERROR: Command execution failed: Traceback (most recent call last):
File "/path/to/bitbake/lib/bb/command.py", line 102, in runAsyncCommand
commandmethod(self.cmds_async, self, options)
File "/path/to/bitbake/lib/bb/command.py", line 324, in generateDotGraph
command.cooker.generateDotGraphFiles(pkgs_to_build, task)
File "/path/to/bitbake/lib/bb/cooker.py", line 847, in generateDotGraphFiles
depgraph = self.generateTaskDepTreeData(pkgs_to_build, task)
File "/path/to/bitbake/lib/bb/cooker.py", line 672, in generateTaskDepTreeData
rq.rqdata.prepare()
File "/path/to/bitbake/lib/bb/runqueue.py", line 587, in prepare
generate_recdeps(dep)
File "/path/to/bitbake/lib/bb/runqueue.py", line 575, in generate_recdeps
add_resolved_dependencies([taskData.tasks_fnid[t]], tasknames, newdeps)
TypeError: list indices must be integers, not NoneType
Update STAMPCLEAN to contain ${PV} to fix the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-source.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-source.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-source.inc b/meta/recipes-devtools/gcc/gcc-source.inc index 529b8e0e8c..794fd4de2e 100644 --- a/meta/recipes-devtools/gcc/gcc-source.inc +++ b/meta/recipes-devtools/gcc/gcc-source.inc @@ -16,7 +16,7 @@ WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}" SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:" STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}" -STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-[0-9]*-*" +STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*" INHIBIT_DEFAULT_DEPS = "1" DEPENDS = "" |