diff --git a/patch/ros-rolling-ros2cli.patch b/patch/ros-rolling-ros2cli.patch new file mode 100644 index 00000000..5a112648 --- /dev/null +++ b/patch/ros-rolling-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-rolling-rosidl.patch b/patch/ros-rolling-rosidl.patch new file mode 100644 index 00000000..965f200b --- /dev/null +++ b/patch/ros-rolling-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/tests/ros-rolling-ros2cli.yaml b/tests/ros-rolling-ros2cli.yaml new file mode 100644 index 00000000..3429fb3e --- /dev/null +++ b/tests/ros-rolling-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-rolling-rosidl.yaml b/tests/ros-rolling-rosidl.yaml new file mode 100644 index 00000000..9a42672a --- /dev/null +++ b/tests/ros-rolling-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