Skip to content

Commit

Permalink
fix(dependency_walker): don't get dependencies of non ROS packages
Browse files Browse the repository at this point in the history
In case we consider non-ROS dep, we don't want to look for
the ROS dependencies of non ROS packages (ie: cmake)
  • Loading branch information
Guillaumebeuzeboc committed Apr 6, 2023
1 parent aab3bf5 commit 76a44b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rosdistro/dependency_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def _get_package_names(self):

def get_depends(self, pkg_name, depend_type, ros_packages_only=False):
'''Return a set of package names which the package depends on.'''
# We can only get the dependencies of ROS packages
if pkg_name not in self._get_package_names():
return set()
deps = self._get_dependencies(pkg_name, depend_type)
if ros_packages_only:
deps &= set(self._get_package_names())
Expand Down

0 comments on commit 76a44b6

Please sign in to comment.