]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: upgrade: use shutil.move instead of os.rename
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Wed, 23 Sep 2015 10:05:25 +0000 (11:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Sep 2015 21:07:20 +0000 (22:07 +0100)
Rename fails over filesystem boundaries.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/upgrade.py

index aa53c8e00bda01328cff8185837be395bb1e024f..4f850cf0e4aeead223972d44548b50ff2bfa6562 100644 (file)
@@ -53,7 +53,7 @@ def _copy_source_code(orig, dest):
         dest_dir = os.path.join(dest, os.path.dirname(path))
         bb.utils.mkdirhier(dest_dir)
         dest_path = os.path.join(dest, path)
-        os.rename(os.path.join(orig, path), dest_path)
+        shutil.move(os.path.join(orig, path), dest_path)
 
 def _get_checksums(rf):
     import re