commit:     b318e036cb86785d19968a4f00a0162218768fd1
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 11:37:20 2020 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 12:44:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b318e036

dev-ros/rosmsg: fix for duplicate packages in show

Fix tests.

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 dev-ros/rosmsg/files/duplicates.patch | 13 +++++++++++++
 dev-ros/rosmsg/rosmsg-1.15.9.ebuild   |  6 ++++++
 2 files changed, 19 insertions(+)

diff --git a/dev-ros/rosmsg/files/duplicates.patch 
b/dev-ros/rosmsg/files/duplicates.patch
new file mode 100644
index 00000000000..4705f00d2e8
--- /dev/null
+++ b/dev-ros/rosmsg/files/duplicates.patch
@@ -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

diff --git a/dev-ros/rosmsg/rosmsg-1.15.9.ebuild 
b/dev-ros/rosmsg/rosmsg-1.15.9.ebuild
index ba0d62bb080..c750959458b 100644
--- a/dev-ros/rosmsg/rosmsg-1.15.9.ebuild
+++ b/dev-ros/rosmsg/rosmsg-1.15.9.ebuild
@@ -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
+}

Reply via email to