diff options
author | Mikko Rapeli <mikko.rapeli@bmw.de> | 2018-08-13 12:42:17 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-14 11:36:31 +0100 |
commit | 8d959ad31a3c8fa15ca692f5240d9565ecfec8bd (patch) | |
tree | a2850018f037943049709857779ab1cbd11a31db | |
parent | fd85436b042b6b9962438fe1e92a193db54755f7 (diff) | |
download | poky-8d959ad31a3c8fa15ca692f5240d9565ecfec8bd.tar.gz |
perf: fail if src path does not exist
A missing src directory from a broken kernel recipe resulted
only in a warning:
WARNING: copyfile: stat of /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch failed ([Errno 2] No such file or directory: '/home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch')
and the build failed horribly.
With this change it's an error which can not be missed:
ERROR: perf-1.0-r9 do_configure: Path does not exist: /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch. Maybe PERF_SRC does not match the kernel version.
ERROR: perf-1.0-r9 do_configure: Function failed: copy_perf_source_from_kernel
ERROR: Logfile of failure stored in: /home/builder/src/tmp-glibc/work/target-linux/perf/1.0-r9/temp/log.do_configure.21083
NOTE: recipe perf-1.0-r9: task do_configure: Failed
ERROR: Task (/home/builder/src/poky/meta/recipes-kernel/perf/perf.bb:do_configure) failed with exit code '1'
To get get perf compiling from a custom kernel, a perf.bbappend can be
created which defines PERF_SRC as list of files and directories needed
from kernel source tree to compile perf. This varies between kernel
versions.
(From OE-Core rev: c392dabefc431dbfb31d6a1465c75ba9cc765804)
Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index ccd2c7d11b..e9db6c66c4 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -147,6 +147,8 @@ python copy_perf_source_from_kernel() { | |||
147 | for s in sources: | 147 | for s in sources: |
148 | src = oe.path.join(src_dir, s) | 148 | src = oe.path.join(src_dir, s) |
149 | dest = oe.path.join(dest_dir, s) | 149 | dest = oe.path.join(dest_dir, s) |
150 | if not os.path.exists(src): | ||
151 | bb.fatal("Path does not exist: %s. Maybe PERF_SRC does not match the kernel version." % src) | ||
150 | if os.path.isdir(src): | 152 | if os.path.isdir(src): |
151 | oe.path.copyhardlinktree(src, dest) | 153 | oe.path.copyhardlinktree(src, dest) |
152 | else: | 154 | else: |