Openembedded Core Discussions
 help / color / mirror / Atom feed
From: AdrianF <adrian.freihofer@siemens.com>
To: openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: [PATCH v2 02/14] devtool: ide-sdk: fix duplicate -p flag in _target_ssh_args
Date: Tue,  4 Aug 2026 13:59:26 +0200	[thread overview]
Message-ID: <20260804120034.378787-3-adrian.freihofer@siemens.com> (raw)
In-Reply-To: <20260804120034.378787-1-adrian.freihofer@siemens.com>

From: Adrian Freihofer <adrian.freihofer@siemens.com>

ssh_port is stored as ['-p', '<port>'] (already includes the flag).
_target_ssh_args was wrapping it in another list with a leading "-p",
producing invalid ssh args like ["-p", ["-p", "2222"]].

Extend ssh_args directly with ssh_port instead of nesting it.

Also pass --port to the install-and-deploy task in the generated VS Code
configuration so the task reaches the target on non-default SSH ports.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 scripts/lib/devtool/ide_plugins/__init__.py |  2 +-
 scripts/lib/devtool/ide_plugins/ide_code.py | 10 ++--------
 scripts/lib/devtool/ide_sdk.py              |  2 +-
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/scripts/lib/devtool/ide_plugins/__init__.py b/scripts/lib/devtool/ide_plugins/__init__.py
index eaf88e78cd..94ed7c9e6d 100644
--- a/scripts/lib/devtool/ide_plugins/__init__.py
+++ b/scripts/lib/devtool/ide_plugins/__init__.py
@@ -142,7 +142,7 @@ class GdbCrossConfig:
     def _target_ssh_gdbserver_args(self):
         ssh_args = []
         if self.gdb_cross.target_device.ssh_port:
-            ssh_args += ["-p", self.gdb_cross.target_device.ssh_port]
+            ssh_args += self.gdb_cross.target_device.ssh_port
         if self.gdb_cross.target_device.extraoptions:
             ssh_args.extend(self.gdb_cross.target_device.extraoptions)
         if self.gdb_cross.target_device.target:
diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py
index 603d3cecf3..96f007ca91 100644
--- a/scripts/lib/devtool/ide_plugins/ide_code.py
+++ b/scripts/lib/devtool/ide_plugins/ide_code.py
@@ -404,10 +404,7 @@ class IdeVSCode(IdeBase):
                     "label": install_task_name,
                     "type": "shell",
                     "command": run_install_deploy,
-                    "args": [
-                        "--target",
-                        args.target
-                    ],
+                    "args": ["--target", args.target] + (["--port", args.port] if args.port else []),
                     "problemMatcher": []
                 }
             ]
@@ -515,10 +512,7 @@ class IdeVSCode(IdeBase):
                     "label": install_task_name,
                     "type": "shell",
                     "command": run_install_deploy,
-                    "args": [
-                        "--target",
-                        args.target
-                    ],
+                    "args": ["--target", args.target] + (["--port", args.port] if args.port else []),
                     "problemMatcher": []
                 },
                 {
diff --git a/scripts/lib/devtool/ide_sdk.py b/scripts/lib/devtool/ide_sdk.py
index 07f5552758..fea44740f3 100755
--- a/scripts/lib/devtool/ide_sdk.py
+++ b/scripts/lib/devtool/ide_sdk.py
@@ -55,7 +55,7 @@ class TargetDevice:
         self.ssh_sshexec = 'ssh'
         if args.ssh_exec:
             self.ssh_sshexec = args.ssh_exec
-        self.ssh_port = ''
+        self.ssh_port = []
         if args.port:
             self.ssh_port = ['-p', args.port]
         if args.key:
-- 
2.55.0



  parent reply	other threads:[~2026-08-04 12:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 11:59 [PATCH v2 00/14] devtool ide-sdk: clang and lldb support AdrianF
2026-08-04 11:59 ` [PATCH v2 01/14] oe-selftest: devtool: use stat for reading user/group names in ide-sdk tests AdrianF
2026-08-04 11:59 ` AdrianF [this message]
2026-08-04 11:59 ` [PATCH v2 03/14] devtool: ide-sdk: fix $@ overwritten by set in install_and_deploy script AdrianF
2026-08-04 11:59 ` [PATCH v2 04/14] devtool: ide-sdk: fix meson compile_commands.json AdrianF
2026-08-04 11:59 ` [PATCH v2 05/14] devtool: deploy-target: fix run strip under pseudo AdrianF
2026-08-04 11:59 ` [PATCH v2 06/14] oe-selftest: devtool ide-sdk: cover breakpoints in exe, header and library AdrianF
2026-08-04 11:59 ` [PATCH v2 07/14] oe-selftest: devtool ide-sdk: add real debug coverage for meson+code AdrianF
2026-08-04 11:59 ` [PATCH v2 08/14] devtool: ide-sdk debugger back-end abstraction AdrianF
2026-08-04 11:59 ` [PATCH v2 09/14] devtool: ide-sdk: wait for gdbserver port before returning AdrianF
2026-08-04 11:59 ` [PATCH v2 10/14] devtool: ide-sdk add LLDB support for clang toolchain AdrianF
2026-08-04 11:59 ` [PATCH v2 11/14] devtool: ide-sdk: add LLDB support for ide=none (clang toolchain) AdrianF
2026-08-04 11:59 ` [PATCH v2 12/14] meta-selftest: refactor cpp examples into .inc files and add clang variants AdrianF
2026-08-04 11:59 ` [PATCH v2 13/14] oe-selftest: devtool ide-sdk: add clang/LLDB test AdrianF
2026-08-07 15:11   ` [OE-core] " Mathieu Dubois-Briand
2026-08-07 15:17     ` Freihofer, Adrian
2026-08-07 15:44       ` Mathieu Dubois-Briand
2026-08-09  9:46         ` adrian.freihofer
2026-08-04 11:59 ` [PATCH v2 14/14] oe-selftest: devtool ide-sdk: add test for ide=none LLDB/clang support AdrianF

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260804120034.378787-3-adrian.freihofer@siemens.com \
    --to=adrian.freihofer@siemens.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox