summaryrefslogtreecommitdiffstats
path: root/scripts
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>2016-01-15 15:51:40 +0000
commit8597a616f33136204f1230d226fbc45e3ea84932 (patch)
treee02d2612751f3900c5c5bf01816471bd3496bbb3 /scripts
parent95cc641ec3ad9b29f9ae538b234f7a36dcb4aa42 (diff)
downloadpoky-8597a616f33136204f1230d226fbc45e3ea84932.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 master rev: e5b841420b9fdd33829f7665a62cd06a3017f7e6) (From OE-Core rev: fa0424ee742a6b331f1c6462eb69fecba6dc7f86) 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')
-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 84b9f32a57..ae310489e6 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -132,7 +132,10 @@ def sdk_update(args, config, basepath, workspace):
132 new_layers_dir = os.path.join(args.updateserver, 'layers') 132 new_layers_dir = os.path.join(args.updateserver, 'layers')
133 old_layers_dir = os.path.join(basepath, 'layers') 133 old_layers_dir = os.path.join(basepath, 'layers')
134 shutil.rmtree(old_layers_dir) 134 shutil.rmtree(old_layers_dir)
135 shutil.copytree(new_layers_dir, old_layers_dir) 135 ret = subprocess.call("cp -a %s %s" % (new_layers_dir, old_layers_dir), shell=True)
136 if ret != 0:
137 logger.error("Copying %s to %s failed" % (new_layers_dir, old_layers_dir))
138 return ret
136 else: 139 else:
137 # devtool sdk-update http://myhost/sdk 140 # devtool sdk-update http://myhost/sdk
138 tmpsdk_dir = '/tmp/sdk-ext' 141 tmpsdk_dir = '/tmp/sdk-ext'