File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -116,14 +116,21 @@ def create_msg_package_index():
116
116
# this is inconvenient since it would always mean we should bump the version number in an overlay
117
117
# when all that is necessary is for it to recognise that it is in an overlay
118
118
# ros_paths = rospkg.get_ros_paths()
119
+
120
+ r = rospkg .RosPack ()
121
+
119
122
package_index = {}
120
123
ros_paths = rospkg .get_ros_package_path ()
121
124
ros_paths = [x for x in ros_paths .split (':' ) if x ]
122
125
# packages that don't properly identify themselves as message packages (fix upstream).
123
126
for path in reversed (ros_paths ): # make sure we pick up the source overlays last
124
127
for unused_package_path , package in find_packages (path ).items ():
125
- if ('message_generation' in [dep .name for dep in package .build_depends ] or
126
- 'genmsg' in [dep .name for dep in package .build_depends ] or
128
+ try :
129
+ depends = r .get_depends (package .name )
130
+ except : # get_depends fails for metapackage
131
+ depends = []
132
+ if ('message_generation' in depends or
133
+ 'genmsg' in depends or
127
134
package .name in rosjava_build_tools .catkin .message_package_whitelist ):
128
135
# print(package.name)
129
136
# print(" version: %s" % package.version)
You can’t perform that action at this time.
0 commit comments