[oe-commits] [openembedded-core] 30/31: perf: fail if src path does not exist

git at git.openembedded.org git at git.openembedded.org
Mon Aug 13 14:02:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit b4992195be03bbaafcae958e18a55cb33f09eb1a
Author: Mikko Rapeli <mikko.rapeli at bmw.de>
AuthorDate: Mon Aug 13 12:42:17 2018 +0300

    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.
    
    Signed-off-by: Mikko Rapeli <mikko.rapeli at bmw.de>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-kernel/perf/perf.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index ccd2c7d..e9db6c6 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() {
     for s in sources:
         src = oe.path.join(src_dir, s)
         dest = oe.path.join(dest_dir, s)
+        if not os.path.exists(src):
+            bb.fatal("Path does not exist: %s. Maybe PERF_SRC does not match the kernel version." % src)
         if os.path.isdir(src):
             oe.path.copyhardlinktree(src, dest)
         else:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list