summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/copy_buildsystem.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index 4d3faf6681..3d5a746586 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -201,21 +201,25 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu
201 write_sigs_file(merged_output, arch_order, merged) 201 write_sigs_file(merged_output, arch_order, merged)
202 202
203def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring="", filterfile=None): 203def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring="", filterfile=None):
204 import shutil
204 bb.note('Generating sstate-cache...') 205 bb.note('Generating sstate-cache...')
205 206
206 nativelsbstring = d.getVar('NATIVELSBSTRING', True) 207 nativelsbstring = d.getVar('NATIVELSBSTRING', True)
207 bb.process.run("gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or '')) 208 bb.process.run("gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or ''))
208 if fixedlsbstring: 209 if fixedlsbstring and nativelsbstring != fixedlsbstring:
209 nativedir = output_sstate_cache + '/' + nativelsbstring 210 nativedir = output_sstate_cache + '/' + nativelsbstring
210 if os.path.isdir(nativedir): 211 if os.path.isdir(nativedir):
211 destdir = os.path.join(output_sstate_cache, fixedlsbstring) 212 destdir = os.path.join(output_sstate_cache, fixedlsbstring)
212 bb.utils.mkdirhier(destdir) 213 for root, _, files in os.walk(nativedir):
213 214 for fn in files:
214 dirlist = os.listdir(nativedir) 215 src = os.path.join(root, fn)
215 for i in dirlist: 216 dest = os.path.join(destdir, os.path.relpath(src, nativedir))
216 src = os.path.join(nativedir, i) 217 if os.path.exists(dest):
217 dest = os.path.join(destdir, i) 218 # Already exists, and it'll be the same file, so just delete it
218 os.rename(src, dest) 219 os.unlink(src)
220 else:
221 bb.utils.mkdirhier(os.path.dirname(dest))
222 shutil.move(src, dest)
219 223
220def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, logfile=None): 224def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, logfile=None):
221 import subprocess 225 import subprocess