diff --git a/src/catkin_lint/ros.py b/src/catkin_lint/ros.py index bf8c138..519d2d7 100644 --- a/src/catkin_lint/ros.py +++ b/src/catkin_lint/ros.py @@ -57,9 +57,11 @@ def has_key(self, name): def get_rosdep(quiet): from rosdep2.lookup import RosdepLookup from rosdep2.rospkg_loader import DEFAULT_VIEW_KEY - from rosdep2.sources_list import SourcesListLoader + from rosdep2.sources_list import SourcesListLoader, SOURCES_CACHE_DIR dummy = DummyRospkg() - sources_loader = SourcesListLoader.create_default(sources_cache_dir=os.environ.get("ROSDEP_CACHE_PATH", None)) + rosdep_cache_dir = os.environ.get("ROSDEP_CACHE_PATH", None) + sources_cache_dir = os.path.join(rosdep_cache_dir, SOURCES_CACHE_DIR) if rosdep_cache_dir is not None else None + sources_loader = SourcesListLoader.create_default(sources_cache_dir=sources_cache_dir) lookup = RosdepLookup.create_from_rospkg(rospack=dummy, rosstack=dummy, sources_loader=sources_loader) return Rosdep(view=lookup.get_rosdep_view(DEFAULT_VIEW_KEY), quiet=quiet)