catkin plugin: create completely valid environment
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
The environment created by the Catkin plugin is really only completely valid at runtime (i.e. when packaged as a snap). It's partially valid at build-time. However, it turns out that as a result of sourcing `setup.sh` (which is required at build-time), various dependencies actually need the valid run-time environment (e.g. `LD_LIBRARY_PATH`, valid `ROS_HOME`, etc.).
This PR fixes LP: [#1674487](https://bugs.launchpad.net/snapcraft/+bug/1674487) by making sure `LD_LIBRARY_PATH` is defined before we source `setup.sh`. It also makes sure `ROS_HOME` is always pointing to a valid place.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix ensuring the Catkin plugin generates a fully valid build-time environment. Defines LD_LIBRARY_PATH before sourcing setup.sh and sets a valid ROS_HOME, resolving Launchpad bug #1674487. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged updates to the Catkin plugin that define LD_LIBRARY_PATH and set a valid ROS_HOME before sourcing setup.sh, resolving build-time environment validation and Launchpad bug #1674487. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1130 catkin plugin: produce build-ready staging area. | snapcraft | merged | Merged update to the Catkin plugin generating a build-ready staging area by adjusting ROS files post-build, resolving LP #1663385. Approved, passed CI, and modified two files to prevent future parts from referencing the old install directory. | |
| #1674487 Catkin plugin requires a valid environment before it runs setup.sh | snapcraft (launchpad) | closed | Abandoned and closed without resolution. The Catkin plugin executes setup.sh before LD_LIBRARY_PATH and SNAP_USER_DATA are initialized, breaking environment hooks. No fix was implemented. | |
| #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. | |
| #1367 catkin plugin: add support for ROS Lunar | snapcraft | merged | Merged the catkin plugin update to support ROS Lunar alongside Indigo, Jade, and Kinetic. CI initially failed due to a Launchpad bug, resolved by adding lsb-release to build-packages. Approved and merged after passing integration tests. | |
| #152 Catkin plugin: Add support for ROS tools. | snapcraft | merged | Merged Catkin plugin updates to properly install ROS packages, include non-source files, and enable ROS tools via an updated wrapper environment. Resolved an xml2-config conflict while planning to remove the redundant roscore plugin. Tests doubled. | |
| #1099 catkin plugin: don't pass args to setup.sh. | snapcraft | merged | 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. | |
| #195 Catkin plugin: Improve cmake path rewrite. | snapcraft | merged | Merged updates to the Catkin plugin that replace hard-coded cmake path rewrites with a generic, robust approach. The change modifies two files to correctly redirect ROS package Config.cmake files to the install directory. |