From 15fb5581410abc8fbedfa47aec2db79b1ceec6c0 Mon Sep 17 00:00:00 2001 From: Naophis Date: Mon, 3 Jun 2024 14:33:18 +0900 Subject: [PATCH 1/4] chore: Hold check of plotjuggler-ros package and display warning if held Signed-off-by: Naophis --- ansible/roles/dev_tools/tasks/main.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/roles/dev_tools/tasks/main.yaml b/ansible/roles/dev_tools/tasks/main.yaml index 2a11dd7ffc6..b2d6937f524 100644 --- a/ansible/roles/dev_tools/tasks/main.yaml +++ b/ansible/roles/dev_tools/tasks/main.yaml @@ -37,6 +37,11 @@ state: latest update_cache: true +- name: Hold check of ros-{{ rosdistro }}-plotjuggler-ros + ansible.builtin.command: apt-mark showhold + register: held_ros_packages + changed_when: false + - name: Install plotjuggler become: true ansible.builtin.apt: @@ -44,3 +49,12 @@ - ros-{{ rosdistro }}-plotjuggler-ros state: latest update_cache: true + when: "'ros-' + rosdistro + '-' + plotjuggler-ros not in held_ros_packages.stdout" + register: install_result + failed_when: false + +- name: Display warning if plotjuggler-ros package is held + ansible.builtin.debug: + msg: ROS package 'ros-{{ rosdistro }}-plotjuggler-ros' is apt-mark hold. Skipping installation. + when: not install_result.changed + From fc9b58e84634fc3c6cb5718e2e31e32036d0a5b8 Mon Sep 17 00:00:00 2001 From: Naophis Date: Mon, 3 Jun 2024 14:55:08 +0900 Subject: [PATCH 2/4] chore: fix condition for checking held ROS package in dev_tools role Signed-off-by: Naophis --- ansible/roles/dev_tools/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/dev_tools/tasks/main.yaml b/ansible/roles/dev_tools/tasks/main.yaml index b2d6937f524..a3c0e53a21a 100644 --- a/ansible/roles/dev_tools/tasks/main.yaml +++ b/ansible/roles/dev_tools/tasks/main.yaml @@ -49,7 +49,7 @@ - ros-{{ rosdistro }}-plotjuggler-ros state: latest update_cache: true - when: "'ros-' + rosdistro + '-' + plotjuggler-ros not in held_ros_packages.stdout" + when: "'ros-' + rosdistro + '-plotjuggler-ros' not in held_ros_packages.stdout" register: install_result failed_when: false From ef235eb969667fe1b955ad5085709f8afea083fa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 06:05:37 +0000 Subject: [PATCH 3/4] style(pre-commit): autofix --- ansible/roles/dev_tools/tasks/main.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/dev_tools/tasks/main.yaml b/ansible/roles/dev_tools/tasks/main.yaml index a3c0e53a21a..8c295cbb791 100644 --- a/ansible/roles/dev_tools/tasks/main.yaml +++ b/ansible/roles/dev_tools/tasks/main.yaml @@ -57,4 +57,3 @@ ansible.builtin.debug: msg: ROS package 'ros-{{ rosdistro }}-plotjuggler-ros' is apt-mark hold. Skipping installation. when: not install_result.changed - From dfe18f4eab8a08562d69b5333ae5e7fc1a8098ce Mon Sep 17 00:00:00 2001 From: Naophis Date: Mon, 3 Jun 2024 16:25:16 +0900 Subject: [PATCH 4/4] chore: Update dev_tools role to fix condition for checking held ROS package Signed-off-by: Naophis --- ansible/roles/dev_tools/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/dev_tools/tasks/main.yaml b/ansible/roles/dev_tools/tasks/main.yaml index 8c295cbb791..1a7d3c6511a 100644 --- a/ansible/roles/dev_tools/tasks/main.yaml +++ b/ansible/roles/dev_tools/tasks/main.yaml @@ -37,7 +37,7 @@ state: latest update_cache: true -- name: Hold check of ros-{{ rosdistro }}-plotjuggler-ros +- name: Hold check of ros-{{ rosdistro + '-plotjuggler-ros' }} ansible.builtin.command: apt-mark showhold register: held_ros_packages changed_when: false