summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/deploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/deploy.py')
-rw-r--r--scripts/lib/devtool/deploy.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index ca74a8e51d..448db9637d 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -19,7 +19,7 @@
19import os 19import os
20import subprocess 20import subprocess
21import logging 21import logging
22from devtool import exec_build_env_command, setup_tinfoil, DevtoolError 22from devtool import exec_fakeroot, setup_tinfoil, DevtoolError
23 23
24logger = logging.getLogger('devtool') 24logger = logging.getLogger('devtool')
25 25
@@ -73,9 +73,13 @@ def deploy(args, config, basepath, workspace):
73 extraoptions = '' 73 extraoptions = ''
74 if args.no_host_check: 74 if args.no_host_check:
75 extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' 75 extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
76 if not args.show_status: 76 if args.show_status:
77 tarextractopts = 'xv'
78 else:
79 tarextractopts = 'x'
77 extraoptions += ' -q' 80 extraoptions += ' -q'
78 ret = subprocess.call('scp -r %s %s/* %s:%s' % (extraoptions, recipe_outdir, args.target, destdir), shell=True) 81 # We cannot use scp here, because it doesn't preserve symlinks
82 ret = exec_fakeroot(rd, 'tar cf - . | ssh %s %s \'tar %s -C %s -f -\'' % (extraoptions, args.target, tarextractopts, destdir), cwd=recipe_outdir, shell=True)
79 if ret != 0: 83 if ret != 0:
80 raise DevtoolError('Deploy failed - rerun with -s to get a complete ' 84 raise DevtoolError('Deploy failed - rerun with -s to get a complete '
81 'error message') 85 'error message')