]> code.ossystems Code Review - openembedded-core.git/commitdiff
copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache
authorRandy Witt <randy.e.witt@linux.intel.com>
Thu, 4 Feb 2016 20:31:41 +0000 (12:31 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 6 Feb 2016 23:08:56 +0000 (23:08 +0000)
If the nativelsb argument is not used, then create_locked_sstate_cache()
can get collisions when moving the files from the input_sstate_cache
to the output_sstate_cache.

The specific case where this was encountered was when a "universal"
nativelsb directory already existed in the input_sstate_cache.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/copy_buildsystem.py

index abee5d9a77945ae2fab2b773c0e84772fa612116..5074a43cb9cb638ff5b3aef99c5974b58e4ce310 100644 (file)
@@ -160,4 +160,11 @@ def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cac
     if fixedlsbstring:
         nativedir = output_sstate_cache + '/' + nativelsbstring
         if os.path.isdir(nativedir):
-            os.rename(nativedir, output_sstate_cache + '/' + fixedlsbstring)
+            destdir = os.path.join(output_sstate_cache, fixedlsbstring)
+            bb.utils.mkdirhier(destdir)
+
+            dirlist = os.listdir(nativedir)
+            for i in dirlist:
+                src = os.path.join(nativedir, i)
+                dest = os.path.join(destdir, i)
+                os.rename(src, dest)