ros2 / demos

Apache License 2.0
502 stars 330 forks source link

Make demo_nodes_cpp_native install stuff only when it builds #590

Closed sloretz closed 1 year ago

sloretz commented 1 year ago

This fixes a problem when using the tarball produced by this job: https://build.ros2.org/view/Hci/job/Hci__nightly-cyclonedds_ubuntu_jammy_amd64/

Rosdep sees demo_nodes_cpp_native requires rmw_fastrtps_cpp, but the tarball doesn't have that package. This causes rosdep to fail to find a system dependency with that name.

The ament_package() call installs the package.xml and an ament_index entry for the demo_nodes_cpp_native package, but I don't think it should because the package didn't build anything. This uses return() to prevent ament_package() from being called when rmw_fastrtps_cpp isn't found.

sloretz commented 1 year ago

CI (build: --packages-up-to demo_nodes_cpp_native test: --packages-select demo_nodes_cpp_native)

CI (CycloneDDS only build: --packages-ignore fastcdr foonathan_memory_vendor rosbag2_converter_default_plugins --packages-ignore-regex .*connext.* .*fastrtps.* --packages-up-to demo_nodes_cpp_native test: --packages-ignore fastcdr foonathan_memory_vendor rosbag2_converter_default_plugins --packages-ignore-regex .*connext.* .*fastrtps.* --packages-select ament_cmake)

sloretz commented 1 year ago

@mergifyio backport humble

mergify[bot] commented 1 year ago

backport humble

✅ Backports have been created

* [#591 Make demo_nodes_cpp_native install stuff only when it builds (backport #590)](https://github.com/ros2/demos/pull/591) has been created for branch `humble`