catkin plugin: don't pass args to setup.sh.
Metadata
Current evaluation
Merged in canonical/snapcraft#1099 (commit 13ec80ff0), fixing LP #1660852 by preventing app arguments from reaching ROS's setup.sh and restoring them for the launched binary.
Resolution: closed resolved
Reason: PR canonical/snapcraft#1099 was approved and merged as commit 13ec80ff0. The Catkin wrapper now isolates application arguments while sourcing setup.sh and passes them to the intended executable.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Currently, apps created in snaps that use the Catkin plugin source ROS's setup.sh. However, this means that the setup.sh attempts to parse any command-line parameters passed to the app in question, which is never desired and will break things most of the time parameters are actually used.
This PR fixes LP: [#1660852](https://bugs.launchpad.net/snapcraft/+bug/1660852) by by saving off any parameters, zeroing them right before sourcing setup.sh, and restoring them before execing the binary in question.
Thanks to @didrocks for the initial approach, though I doubt you thought it'd be this yucky, eh?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#1099 (commit 13ec80ff0), fixing LP #1660852 by preventing app arguments from reaching ROS's setup.sh and restoring them for the launched binary. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1099 (commit 13ec80ff0) fixes LP #1660852: the catkin/ROS launch wrapper now saves app args, zeroes them before sourcing setup.sh, and restores them before exec. Still visible in extensions/ros1/launch. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1099 fixes LP #1660852: the catkin wrapper now saves and clears app arguments before sourcing ROS setup.sh, then restores them before execution. Commit 13ec80ff0. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for catkin plugin LP #1660852. Prevents command-line arguments from reaching ROS's setup.sh by saving and clearing them before sourcing, then restoring them before binary execution. Includes updated manual test docs. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix for the catkin plugin preventing ROS setup.sh from incorrectly parsing app command-line arguments. The change temporarily zeros and restores arguments during execution. Unit and manual tests were added to verify the fix. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1660852 Wrapper created by Catkin plugin crashes with certain arguments | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft#1099, which stopped the Catkin wrapper from forwarding command-line arguments to ROS setup.sh. | |
| #1674487 Catkin plugin requires a valid environment before it runs setup.sh | snapcraft (launchpad) | closed | Catkin setup.sh environment handling was fixed in snapcore/snapcraft#1239, cited by the maintainer as the resolution for Launchpad #1674487. |