Skip to content

Commit

Permalink
Fix conditional dependencies when one package uses manifest.xml
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <[email protected]>
  • Loading branch information
sloretz committed Jan 4, 2020
1 parent edb89c4 commit 9103a1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rosdep2/rospkg_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ def get_rosdeps(self, resource_name, implicit=True):
deps = pkg.build_depends + pkg.buildtool_depends + pkg.run_depends + pkg.test_depends
return [d.name for d in deps if d.evaluated_condition]
elif resource_name in self.get_loadable_resources():
return self._rospack.get_rosdeps(resource_name, implicit=implicit)
rosdeps = set(self._rospack.get_rosdeps(resource_name, implicit=False))
if implicit:
# This resource is a manifest.xml, but it might depend on things with a package.xml
# Make sure they get a chance to evaluate conditions
for dep in self._rospack.get_depends(resource_name):
rosdeps = rosdeps.union(set(self.get_rosdeps(dep, implicit=True)))
return rosdeps
elif resource_name in self._rosstack.list():
# stacks currently do not have rosdeps of their own, implicit or otherwise
return []
Expand Down

0 comments on commit 9103a1a

Please sign in to comment.