summaryrefslogtreecommitdiffstats
path: root/meta/classes/devtool-source.bbclass
diff options
context:
space:
mode:
authorJaewon Lee <jaewon.lee@xilinx.com>2018-12-14 16:39:22 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-06 10:39:25 +0000
commit206ca252c64eb0048f05da6933b5923b2346ef09 (patch)
treed3bd034be414706158bdad025b31703a2679900b /meta/classes/devtool-source.bbclass
parent243655b6c22ced795d79c888fd0f01608300dfaa (diff)
downloadpoky-206ca252c64eb0048f05da6933b5923b2346ef09.tar.gz
devtool: Support kmeta directory usage with devtool modify/finish
When using Kmeta directories, devtool finish will add every single file in the directory to the bbappend. This is because in the current implementation, the get_recipe_local_files function treats the kmeta directory like a file. Modifying the function to loop through the provided directories and return all included files instead of just the top level directory. This will enable correct file to file comparison when determing which files are new/changed and need to be added to the bbappend. Adding an extra check in devtool-source.bbclass to not copy the cfg file if its already included somewhere in the kmeta directory Also during 'modify', when moving necessary files in the kmeta directory from the workdir to oe-local-files, the dangling parent directories are left behind. This in itself is not an issue as the temporary devtool workspace is automatically deleted, but this causes an incorrect include directory to be added in kernel-yocto.bbclass. Changing the order of the if statements to catch the correct conditional. This is safe to do as when not in the devtool context, there will be no oe-local-files directory. (From OE-Core rev: 4671011b5b02d0989aa0fdcb50e18cb385a0e95e) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/devtool-source.bbclass')
-rw-r--r--meta/classes/devtool-source.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/devtool-source.bbclass b/meta/classes/devtool-source.bbclass
index 1372e32c9e..a8110006fb 100644
--- a/meta/classes/devtool-source.bbclass
+++ b/meta/classes/devtool-source.bbclass
@@ -103,8 +103,10 @@ python devtool_post_unpack() {
103 for l in sccfile: 103 for l in sccfile:
104 line = l.split() 104 line = l.split()
105 if line and line[0] in ('kconf', 'patch'): 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]) 106 cfg = 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) 107 if not cfg in local_files.values():
108 local_files[line[-1]] = cfg
109 shutil.copy2(cfg, workdir)
108 sccfile.close() 110 sccfile.close()
109 111
110 # Ignore local files with subdir={BP} 112 # Ignore local files with subdir={BP}