summaryrefslogtreecommitdiffstats
path: root/meta/classes/devtool-source.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/devtool-source.bbclass')
-rw-r--r--meta/classes/devtool-source.bbclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass
index 56882a41d8..67cd0bafb2 100644
--- a/meta/classes/devtool-source.bbclass
+++ b/meta/classes/devtool-source.bbclass
@@ -90,11 +90,23 @@ python devtool_post_unpack() {
90 fname in files]) 90 fname in files])
91 return ret 91 return ret
92 92
93 is_kernel_yocto = bb.data.inherits_class('kernel-yocto', d)
93 # Move local source files into separate subdir 94 # Move local source files into separate subdir
94 recipe_patches = [os.path.basename(patch) for patch in 95 recipe_patches = [os.path.basename(patch) for patch in
95 oe.recipeutils.get_recipe_patches(d)] 96 oe.recipeutils.get_recipe_patches(d)]
96 local_files = oe.recipeutils.get_recipe_local_files(d) 97 local_files = oe.recipeutils.get_recipe_local_files(d)
97 98
99 if is_kernel_yocto:
100 for key in local_files.copy():
101 if key.endswith('scc'):
102 sccfile = open(local_files[key], 'r')
103 for l in sccfile:
104 line = l.split()
105 if line and line[0] in ('kconf', 'patch'):
106 local_files[line[-1]] = os.path.join(os.path.dirname(local_files[key]), line[-1])
107 shutil.copy2(os.path.join(os.path.dirname(local_files[key]), line[-1]), workdir)
108 sccfile.close()
109
98 # Ignore local files with subdir={BP} 110 # Ignore local files with subdir={BP}
99 srcabspath = os.path.abspath(srcsubdir) 111 srcabspath = os.path.abspath(srcsubdir)
100 local_files = [fname for fname in local_files if 112 local_files = [fname for fname in local_files if