summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/sdk.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-12-18 13:46:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-28 09:25:19 +0000
commit23302ee03ae47136e39d324fabe1ecf40bc3ae79 (patch)
tree0350f58bff6831027d6a81c774c85ccf15660439 /scripts/lib/devtool/sdk.py
parentd6e7b5b1b18eaea8d0b700e8b9d82e53ef9ce67e (diff)
downloadpoky-23302ee03ae47136e39d324fabe1ecf40bc3ae79.tar.gz
devtool: use cp instead of shutil.copytree
Copied layers with 'cp -a' instead of calling shutil.copytree as copytree fails to copy broken symlinks. More pythonic fix would be to use copytree with 'ignore' parameter, but this could slow down copying complex directory structures. [YOCTO #8825] (From OE-Core rev: e5b841420b9fdd33829f7665a62cd06a3017f7e6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/sdk.py')
-rw-r--r--scripts/lib/devtool/sdk.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index f08f0eee7c..47b9a7e1fc 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -128,7 +128,10 @@ def sdk_update(args, config, basepath, workspace):
128 new_layers_dir = os.path.join(args.updateserver, 'layers') 128 new_layers_dir = os.path.join(args.updateserver, 'layers')
129 old_layers_dir = os.path.join(basepath, 'layers') 129 old_layers_dir = os.path.join(basepath, 'layers')
130 shutil.rmtree(old_layers_dir) 130 shutil.rmtree(old_layers_dir)
131 shutil.copytree(new_layers_dir, old_layers_dir) 131 ret = subprocess.call("cp -a %s %s" % (new_layers_dir, old_layers_dir), shell=True)
132 if ret != 0:
133 logger.error("Copying %s to %s failed" % (new_layers_dir, old_layers_dir))
134 return ret
132 else: 135 else:
133 # devtool sdk-update http://myhost/sdk 136 # devtool sdk-update http://myhost/sdk
134 tmpsdk_dir = '/tmp/sdk-ext' 137 tmpsdk_dir = '/tmp/sdk-ext'