aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-11-27 09:59:55 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-12-05 14:38:40 +1300
commit2b35c6f4e37ece0d6a7d46ed0195b88d83c162b5 (patch)
treebae8198c8974dcd280fd7739d20498dbfe55fadd
parent74154b4da32cff6d3d3ec002ae742f6bf272ceb1 (diff)
downloadopenembedded-core-contrib-2b35c6f4e37ece0d6a7d46ed0195b88d83c162b5.tar.gz
openembedded-core-contrib-2b35c6f4e37ece0d6a7d46ed0195b88d83c162b5.tar.bz2
openembedded-core-contrib-2b35c6f4e37ece0d6a7d46ed0195b88d83c162b5.zip
devtool: deploy-target: don't specify ssh/scp port unless user does
If the user doesn't specify a port then we should avoid specifying one on the ssh/scp command line in case the user has configured one for the host they are connecting to, which was being overridden unnecessarily. Fixes [YOCTO #12381]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--scripts/lib/devtool/deploy.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index 9cc492788b6..52e261d5600 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -213,9 +213,7 @@ def deploy(args, config, basepath, workspace):
scp_port = ''
ssh_port = ''
- if not args.port:
- raise DevtoolError("If you specify -P/--port then you must provide the port to be used to connect to the target")
- else:
+ if args.port:
scp_port = "-P %s" % args.port
ssh_port = "-p %s" % args.port
@@ -280,9 +278,7 @@ def undeploy(args, config, basepath, workspace):
scp_port = ''
ssh_port = ''
- if not args.port:
- raise DevtoolError("If you specify -P/--port then you must provide the port to be used to connect to the target")
- else:
+ if args.port:
scp_port = "-P %s" % args.port
ssh_port = "-p %s" % args.port
@@ -328,7 +324,7 @@ def register_commands(subparsers, context):
parser_deploy.add_argument('-n', '--dry-run', help='List files to be deployed only', action='store_true')
parser_deploy.add_argument('-p', '--no-preserve', help='Do not preserve existing files', action='store_true')
parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true')
- parser_deploy.add_argument('-P', '--port', default='22', help='Port to use for connection to the target')
+ parser_deploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
strip_opts = parser_deploy.add_mutually_exclusive_group(required=False)
strip_opts.add_argument('-S', '--strip',
@@ -350,5 +346,5 @@ def register_commands(subparsers, context):
parser_undeploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true')
parser_undeploy.add_argument('-a', '--all', help='Undeploy all recipes deployed on the target', action='store_true')
parser_undeploy.add_argument('-n', '--dry-run', help='List files to be undeployed only', action='store_true')
- parser_undeploy.add_argument('-P', '--port', default='22', help='Port to use for connection to the target')
+ parser_undeploy.add_argument('-P', '--port', help='Specify port to use for connection to the target')
parser_undeploy.set_defaults(func=undeploy)