From aa2b345b6eb8e1d539e06f33fb8d3e80fa708273 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sat, 18 Apr 2026 10:33:37 +0200 Subject: [PATCH 1/2] Fix ros2cli + rosidl_cli auto-completion --- patch/ros-jazzy-ros2cli.patch | 33 +++++++++++++++++++++++++++++++++ patch/ros-jazzy-rosidl.patch | 33 +++++++++++++++++++++++++++++++++ pkg_additional_info.yaml | 9 +++++++-- tests/ros-jazzy-ros2cli.yaml | 7 +++++++ tests/ros-jazzy-rosidl.yaml | 7 +++++++ 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 patch/ros-jazzy-ros2cli.patch create mode 100644 patch/ros-jazzy-rosidl.patch create mode 100644 tests/ros-jazzy-ros2cli.yaml create mode 100644 tests/ros-jazzy-rosidl.yaml diff --git a/patch/ros-jazzy-ros2cli.patch b/patch/ros-jazzy-ros2cli.patch new file mode 100644 index 000000000..5a1126482 --- /dev/null +++ b/patch/ros-jazzy-ros2cli.patch @@ -0,0 +1,33 @@ +diff --git a/ros2cli/completion/ros2-argcomplete.bash b/ros2cli/completion/ros2-argcomplete.bash +index a5f2d67..ab9f656 100644 +--- a/ros2cli/completion/ros2-argcomplete.bash ++++ b/ros2cli/completion/ros2-argcomplete.bash +@@ -12,8 +12,6 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-if type register-python-argcomplete3 > /dev/null 2>&1; then +- eval "$(register-python-argcomplete3 ros2)" +-elif type register-python-argcomplete > /dev/null 2>&1; then ++if type register-python-argcomplete > /dev/null 2>&1; then + eval "$(register-python-argcomplete ros2)" + fi +diff --git a/ros2cli/setup.py b/ros2cli/setup.py +index 232c5bc..d774f33 100644 +--- a/ros2cli/setup.py ++++ b/ros2cli/setup.py +@@ -20,6 +20,14 @@ setup( + 'completion/ros2-argcomplete.bash', + 'completion/ros2-argcomplete.zsh' + ]), ++ ++ # [pixi] install autocompletion scripts ++ ('share/bash-completion/completions', [ ++ 'completion/ros2-argcomplete.bash', ++ ]), ++ ('share/zsh/site-functions', [ ++ 'completion/ros2-argcomplete.zsh' ++ ]), + ], + zip_safe=False, + author='Dirk Thomas', diff --git a/patch/ros-jazzy-rosidl.patch b/patch/ros-jazzy-rosidl.patch new file mode 100644 index 000000000..965f200b6 --- /dev/null +++ b/patch/ros-jazzy-rosidl.patch @@ -0,0 +1,33 @@ +diff --git a/rosidl_cli/completion/rosidl-argcomplete.bash b/rosidl_cli/completion/rosidl-argcomplete.bash +index 0262ec2..c3e8606 100644 +--- a/rosidl_cli/completion/rosidl-argcomplete.bash ++++ b/rosidl_cli/completion/rosidl-argcomplete.bash +@@ -12,8 +12,6 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-if type register-python-argcomplete3 > /dev/null 2>&1; then +- eval "$(register-python-argcomplete3 rosidl)" +-elif type register-python-argcomplete > /dev/null 2>&1; then ++if type register-python-argcomplete > /dev/null 2>&1; then + eval "$(register-python-argcomplete rosidl)" + fi +diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py +index bacc9e8..b4fd32c 100644 +--- a/rosidl_cli/setup.py ++++ b/rosidl_cli/setup.py +@@ -20,6 +20,14 @@ setup( + 'completion/rosidl-argcomplete.bash', + 'completion/rosidl-argcomplete.zsh' + ]), ++ ++ # [pixi] install autocompletion scripts ++ ('share/bash-completion/completions', [ ++ 'completion/rosidl-argcomplete.bash', ++ ]), ++ ('share/zsh/site-functions', [ ++ 'completion/rosidl-argcomplete.zsh' ++ ]), + ], + zip_safe=False, + author='Michel Hidalgo', diff --git a/pkg_additional_info.yaml b/pkg_additional_info.yaml index d041a3b5e..b6521d95e 100644 --- a/pkg_additional_info.yaml +++ b/pkg_additional_info.yaml @@ -182,9 +182,9 @@ apriltag_detector_mit: build_number: 17 apriltag_detector: build_number: 17 - + cloudini_lib: - build_number: 17 + build_number: 17 cloudini_ros: build_number: 17 @@ -195,3 +195,8 @@ uncrustify_vendor: build_number: 17 ament_xmllint: build_number: 17 + +rosidl_cli: + build_number: 17 +ros2cli: + build_number: 17 diff --git a/tests/ros-jazzy-ros2cli.yaml b/tests/ros-jazzy-ros2cli.yaml new file mode 100644 index 000000000..3429fb3ee --- /dev/null +++ b/tests/ros-jazzy-ros2cli.yaml @@ -0,0 +1,7 @@ +tests: + # Regression test for https://github.com/RoboStack/ros-humble/issues/271 + - script: + - if: unix + then: + - test -f ${PREFIX}/share/bash-completion/completions/ros2-argcomplete.bash + - test -f ${PREFIX}/share/zsh/site-functions/ros2-argcomplete.zsh diff --git a/tests/ros-jazzy-rosidl.yaml b/tests/ros-jazzy-rosidl.yaml new file mode 100644 index 000000000..9a42672a3 --- /dev/null +++ b/tests/ros-jazzy-rosidl.yaml @@ -0,0 +1,7 @@ +tests: + # Regression test for https://github.com/RoboStack/ros-humble/issues/271 + - script: + - if: unix + then: + - test -f ${PREFIX}/share/bash-completion/completions/rosidl-argcomplete.bash + - test -f ${PREFIX}/share/zsh/site-functions/rosidl-argcomplete.zsh From 73a184319d90b5c8681c64097e374b730193432c Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sat, 18 Apr 2026 11:32:07 +0200 Subject: [PATCH 2/2] Minimize patch --- patch/ros-jazzy-ros2cli.patch | 14 -------------- patch/ros-jazzy-rosidl.patch | 16 +--------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/patch/ros-jazzy-ros2cli.patch b/patch/ros-jazzy-ros2cli.patch index 5a1126482..480c11462 100644 --- a/patch/ros-jazzy-ros2cli.patch +++ b/patch/ros-jazzy-ros2cli.patch @@ -1,17 +1,3 @@ -diff --git a/ros2cli/completion/ros2-argcomplete.bash b/ros2cli/completion/ros2-argcomplete.bash -index a5f2d67..ab9f656 100644 ---- a/ros2cli/completion/ros2-argcomplete.bash -+++ b/ros2cli/completion/ros2-argcomplete.bash -@@ -12,8 +12,6 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - --if type register-python-argcomplete3 > /dev/null 2>&1; then -- eval "$(register-python-argcomplete3 ros2)" --elif type register-python-argcomplete > /dev/null 2>&1; then -+if type register-python-argcomplete > /dev/null 2>&1; then - eval "$(register-python-argcomplete ros2)" - fi diff --git a/ros2cli/setup.py b/ros2cli/setup.py index 232c5bc..d774f33 100644 --- a/ros2cli/setup.py diff --git a/patch/ros-jazzy-rosidl.patch b/patch/ros-jazzy-rosidl.patch index 965f200b6..b3cd6f5f6 100644 --- a/patch/ros-jazzy-rosidl.patch +++ b/patch/ros-jazzy-rosidl.patch @@ -1,17 +1,3 @@ -diff --git a/rosidl_cli/completion/rosidl-argcomplete.bash b/rosidl_cli/completion/rosidl-argcomplete.bash -index 0262ec2..c3e8606 100644 ---- a/rosidl_cli/completion/rosidl-argcomplete.bash -+++ b/rosidl_cli/completion/rosidl-argcomplete.bash -@@ -12,8 +12,6 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - --if type register-python-argcomplete3 > /dev/null 2>&1; then -- eval "$(register-python-argcomplete3 rosidl)" --elif type register-python-argcomplete > /dev/null 2>&1; then -+if type register-python-argcomplete > /dev/null 2>&1; then - eval "$(register-python-argcomplete rosidl)" - fi diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py index bacc9e8..b4fd32c 100644 --- a/rosidl_cli/setup.py @@ -20,7 +6,7 @@ index bacc9e8..b4fd32c 100644 'completion/rosidl-argcomplete.bash', 'completion/rosidl-argcomplete.zsh' ]), -+ ++ + # [pixi] install autocompletion scripts + ('share/bash-completion/completions', [ + 'completion/rosidl-argcomplete.bash',