diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-06-09 02:04:46 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-11 23:59:18 +0100 |
commit | e53c8719ba971280985dff382dd33fc6af7a9b0c (patch) | |
tree | 6791c85b14c4e988b9eb6888673bdcdc79ad4004 /meta/recipes-devtools/gcc | |
parent | 7a4d72dc18ff4ce5b02684026ba1d564a2ab5c41 (diff) | |
download | poky-e53c8719ba971280985dff382dd33fc6af7a9b0c.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.
(From OE-Core rev: 9099d46a46ee511d1b7e496472c5b973e8e8feaf)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-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}" | |||
16 | SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:" | 16 | SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:" |
17 | 17 | ||
18 | STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}" | 18 | STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}" |
19 | STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-[0-9]*-*" | 19 | STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*" |
20 | 20 | ||
21 | INHIBIT_DEFAULT_DEPS = "1" | 21 | INHIBIT_DEFAULT_DEPS = "1" |
22 | DEPENDS = "" | 22 | DEPENDS = "" |