summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/classes/devtool-source.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/classes/devtool-source.bbclass')
-rw-r--r--external/poky/meta/classes/devtool-source.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/external/poky/meta/classes/devtool-source.bbclass b/external/poky/meta/classes/devtool-source.bbclass
index 1372e32c..280d6009 100644
--- a/external/poky/meta/classes/devtool-source.bbclass
+++ b/external/poky/meta/classes/devtool-source.bbclass
@@ -97,15 +97,15 @@ python devtool_post_unpack() {
local_files = oe.recipeutils.get_recipe_local_files(d)
if is_kernel_yocto:
- for key in local_files.copy():
- if key.endswith('scc'):
- sccfile = open(local_files[key], 'r')
+ for key in [f for f in local_files if f.endswith('scc')]:
+ with open(local_files[key], 'r') as sccfile:
for l in sccfile:
line = l.split()
if line and line[0] in ('kconf', 'patch'):
- local_files[line[-1]] = os.path.join(os.path.dirname(local_files[key]), line[-1])
- shutil.copy2(os.path.join(os.path.dirname(local_files[key]), line[-1]), workdir)
- sccfile.close()
+ cfg = os.path.join(os.path.dirname(local_files[key]), line[-1])
+ if cfg not in local_files.values():
+ local_files[line[-1]] = cfg
+ shutil.copy2(cfg, workdir)
# Ignore local files with subdir={BP}
srcabspath = os.path.abspath(srcsubdir)