Skip to content

Conversation

@dave992
Copy link

@dave992 dave992 commented Aug 20, 2024

Executing the rosdep command from the root of the repository results in multiple packages found with the same name when run from the CI on GitLab. (See #876 for more information)

I have been unable to find the root cause for this, but this fix seems to circumvent the issue by restricting the folders rosdep can search in. I believe functionally this should behave the same.

fi

ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "." rosdep install "${rosdep_opts[@]}"
ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "$@" rosdep install "${rosdep_opts[@]}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only work, if only one argument is passed.

I am not sure, why this fixes the issue.
This just changes the execution directory and not the discovery of packages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "$@" rosdep install "${rosdep_opts[@]}"
ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "${1:-.}" rosdep install "${rosdep_opts[@]}"

Should do the trick.
I still have to figure out why rosdep behaves that way

Executing the rosdep command from the root of repository (!= workspace),
results in multiple packages found with the same name when run from the
CI on GitLab.

Unable to reproduce this from inside the same container as the CI runs,
but this fix seems to circumvent the issue by restricting the folders
rosdep can search in. Functionally this should behave the same.
@dave992 dave992 force-pushed the fix/rosdep_multiple_pkgs_found branch from e16cacb to 1545b41 Compare June 10, 2025 14:01
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.

2 participants