Skip to content

Commit

Permalink
dev-ros/rosmsg: fix for duplicate packages in show
Browse files Browse the repository at this point in the history
Fix tests.

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Alexis Ballier <[email protected]>
  • Loading branch information
aballier committed Oct 20, 2020
1 parent 7e163c4 commit b318e03
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dev-ros/rosmsg/files/duplicates.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: rosmsg/src/rosmsg/__init__.py
===================================================================
--- rosmsg.orig/src/rosmsg/__init__.py
+++ rosmsg/src/rosmsg/__init__.py
@@ -618,7 +618,7 @@ def rosmsg_cmd_show(mode, full, alias='s
if '/' in arg: #package specified
rosmsg_debug(rospack, mode, arg, options.raw)
else:
- found_msgs = list(rosmsg_search(rospack, mode, arg))
+ found_msgs = list(dict.fromkeys(rosmsg_search(rospack, mode, arg)))
if not found_msgs:
print("Could not find msg '%s'" % arg, file=sys.stderr)
return 1
6 changes: 6 additions & 0 deletions dev-ros/rosmsg/rosmsg-1.15.9.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ RDEPEND="
DEPEND="${RDEPEND}
test? ( dev-ros/test_rosmaster[${PYTHON_SINGLE_USEDEP}] )
"
PATCHES=( "${FILESDIR}/duplicates.patch" )

src_test() {
export ROS_PACKAGE_PATH="${S}/../../:${ROS_PACKAGE_PATH}"
ros-catkin_src_test
}

0 comments on commit b318e03

Please sign in to comment.