← Back to issue list

catkin plugin: don't pass args to setup.sh.

View original Github issue

Metadata

Project
snapcraft
Number
#1099
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged a fix for the catkin plugin that saves, zeros, and restores command-line arguments before sourcing ROS's setup.sh. Resolves Launchpad bug #1660852 and adds manual test verification.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#324 catkin plugin: do not overwrite the PYTHONPATH snapcraft merged Merged a fix for the catkin plugin that preserves the PYTHONPATH instead of overwriting it. This resolves a ROS test failure and LP: #1544790 by retaining paths set by setup.sh. Approved and merged by maintainers.
73%
#1239 catkin plugin: create completely valid environment snapcraft merged Merged. Updates the Catkin plugin to create a fully valid build-time environment by setting LD_LIBRARY_PATH before sourcing setup.sh and ensuring ROS_HOME is valid. Resolves Launchpad bug #1674487 following maintainer approval.
71%