ROS plugins v2 misc fixes
Metadata
Current evaluation
Merged. Fixes ROS plugins v2 staging failures by checking local ROS directories and skipping rosdep resolution for locally available packages. Updated tests for core20. Approved by two reviewers and passed CI.
Suggested action: —
No scores available.
Issue body
This PR most notably,
- looks for ROS packages in `$SNAPCRAFT_PART_INSTALL/opt/ros/$ROS_DISTRO` in case the workspace exists (e.g. provided by a build-snap) during the build step
- does not `rosdep resolve` packages that are available locally in `$SNAPCRAFT_PART_INSTALL/opt/ros/$ROS_DISTRO` during stage step. Such locally available package may be part of the built sources or provided by a stage-snap. Furthermore, it fixes the following current issue; if the source contains packages `foo` & `bar` - two packages that are not released in the rosdistro database - where `foo` depends on `bar`, staging fails as it tries to `rosdep resolve` the `bar` key (which does not exists since it is not released). With this fix, it finds `bar` locally and thus does not try to resolve it.
- port 'test-snapcraft-fake-ros-package-core18' to core20 to test the above 2 bullets
Note:
- I own the test-snapcraft-fake-ros-package-core20 snap that's used in the new spread test, I imagine we should transfer ownership
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Fixes ROS plugins v2 staging failures by checking local ROS directories and skipping rosdep resolution for locally available packages. Updated tests for core20. Approved by two reviewers and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Fixed ROS plugins v2 to check local install paths and skip rosdep resolution for locally available packages, preventing staging failures. Added a core20 test. Author acknowledged a related user issue for future investigation. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Fixes ROS plugins v2 by checking local install paths for packages and skipping rosdep resolution for locally available ones, preventing staging failures for unreleased dependencies. Tests updated to core20. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3566 ROS 2 plugins v2 misc fixes | snapcraft | merged | Merged after resolving conflicts and passing CI. Fixes ROS 2 plugins v2 by updating the colcon install path, resolving local packages during staging by removing the COLCON_IGNORE marker, and adding spread tests. | |
| #3664 ROS plugins v2: respect source-subdir key | snapcraft | merged | Merged. Updates ROS plugins v2 to respect the source-subdir key, removes an unnecessary catkin_tools dependency, and adds tests for Colcon and catkin v2 subdir handling. Approved by reviewers and passed CI. | |
| #3994 core22 colcon plugin: re-source environment after installation | snapcraft | merged | Merged fix for core22 colcon plugin that re-sources ROS 2 environment post-installation to resolve custom interface build failures. Added spread tests and package state restoration. Approved by two reviewers and merged. | |
| #3095 plugins: break out rosdep resolve parsing for external use | snapcraft | merged | Merged. Extracted rosdep resolve parsing logic for external use by the colcon v2 plugin. Approved by one reviewer, passed CI checks, and modified one file (+34/-27). | |
| #3745 Fix/core20 ros plugin build failure should stop snapcraft | snapcraft | merged | Merged fix ensuring ROS plugin build failures halt snapcraft. Bash disabled errexit in command substitutions, so the change explicitly saves and restores the option. Includes regression tests, passed CI, and received approval. | |
| #4828 Add ROS 2 Jazzy content-sharing support | snapcraft | merged | Added ROS 2 Jazzy content-sharing support. Merged after approval by two reviewers and passing CI checks. Changes span 13 files (+627/-18). Author noted unrelated failing spread tests. | |
| #3405 [feature] ROS plugins v2 out of source tree builds | snapcraft | merged | Merged. Enables out-of-source-tree builds for ROS plugins v2, allowing snapcraft.yaml placement in the package root. Replaces PR #3348. Approved by two reviewers and passed CI. | |
| #3750 Add core22 colcon plugin / ros2-humble extension | snapcraft | merged | Merged into main. Introduces the core22 colcon plugin and ros2-humble extension to Snapcraft. Approved by two reviewers, passed CI checks, and integrated with a minor test coverage decrease. | |
| #6139 fix: ros content sharing non upstream package 8 14 | snapcraft | merged | Merged a fix updating the ROS 2 plugin to handle non-upstream package dependencies and replace deprecated rospack with ros2 pkg. The changes supersede PR #6120, incorporate requested unit tests, and passed review and CI validation. | |
| #3570 ROS V2 plugins: resolve conditional dependencies | snapcraft | merged | Merged to master, enabling conditional dependencies in ROS V2 plugins for ROS_VERSION, ROS_DISTRO, and ROS_PYTHON_VERSION. Approved after CI passed and spread tests were updated to cover the feature. |