Skip to content

pkg_additional_info: don't normalize a ROS name twice (ros2_pulse -> pulse) - #193

Merged
Tobias-Fischer merged 1 commit into
RoboStack:masterfrom
Tobias-Fischer:fix/additional-info-double-normalize
Nov 8, 2026
Merged

Tobias-Fischer merged 1 commit into
RoboStack:masterfrom
Tobias-Fischer:fix/additional-info-double-normalize

Conversation

@Tobias-Fischer

Copy link
Copy Markdown
Contributor

get_pkg_additional_info normalizes the name it's given (strips ros2_, ros_<distro>_, ros_), but most callers already pass the ROS name: recipes.py and sources.py (is_dummy_metapackage(shortname, …)) and template.py (the build script's additional_cmake_args). A ROS name that starts with ros2_ or ros_ loses that prefix there (ros2_pulse → pulse), so its pkg_additional_info.yaml entry is silently ignored: additional_cmake_args, dummy packages, and the build number where a caller passes the ROS name.

Found in RoboStack/robostack#190: ros2_pulse: additional_cmake_args (if: osx) never reached the build script, while the same entry for other packages works.

Now the name is used as it is when it is a key; otherwise it's normalized as before, so conda names (ros2-ros2-pulse, ros-humble-ros2-pulse) keep working.

  • New tests in test_utils.py: ros2_pulse found by its ROS and both conda names (entry and build number), rtabmap_odom likewise, a package without an entry. Without the fix, the ROS-name case fails; all vinca tests pass (333).
  • RoboStack's current pkg_additional_info.yaml files (shared and per distribution) have no entries for ros2_*/ros_* packages, so this changes nothing there.

🤖 Generated with Claude Code

Most callers (recipes, sources, the build-script template) pass the ROS
name, which get_pkg_additional_info normalized again: a name starting with
ros2_/ros_ lost that prefix (ros2_pulse -> pulse), so its entry (build
number, additional_cmake_args, dummy package) was silently ignored. Use the
name as it is when it's a key, else strip the conda prefix as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer
Tobias-Fischer merged commit a600eab into RoboStack:master Nov 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant