]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: create directories before copying single files
authorBruce Ashfield <bruce.ashfield@gmail.com>
Mon, 21 Oct 2019 20:16:16 +0000 (16:16 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Nov 2019 13:31:27 +0000 (13:31 +0000)
If we need to copy a single file from the linux source tree into
the perf source tree, we need to ensure that the directory structure
it requires has been created first.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-kernel/perf/perf.bb

index 0f5df74f11d649594e07c3c2cad9ebfb66742a14..66d3c1d3251d94792d1566d014e416eaeb97075d 100644 (file)
@@ -153,6 +153,8 @@ python copy_perf_source_from_kernel() {
         if os.path.isdir(src):
             oe.path.copyhardlinktree(src, dest)
         else:
+            src_path = os.path.dirname(s)
+            os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True)
             bb.utils.copyfile(src, dest)
 }