summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
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-05 22:27:22 +0000
commit4671011b5b02d0989aa0fdcb50e18cb385a0e95e (patch)
tree04876e0dfc9fbdcafb1621a54a3fc390da92993b /meta/lib/oe/recipeutils.py
parent623b1e59f752c6bdd4e7e46a007191ee13405830 (diff)
downloadopenembedded-core-contrib-4671011b5b02d0989aa0fdcb50e18cb385a0e95e.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. 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/lib/oe/recipeutils.py')
-rw-r--r--meta/lib/oe/recipeutils.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index 8f70d2eb212..4ca200d8344 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -482,7 +482,14 @@ def get_recipe_local_files(d, patches=False, archives=False):
unpack = fetch.ud[uri].parm.get('unpack', True)
if unpack:
continue
- ret[fname] = localpath
+ if os.path.isdir(localpath):
+ for root, dirs, files in os.walk(localpath):
+ for fname in files:
+ fileabspath = os.path.join(root,fname)
+ srcdir = os.path.dirname(localpath)
+ ret[os.path.relpath(fileabspath,srcdir)] = fileabspath
+ else:
+ ret[fname] = localpath
return ret