diff --git a/roles/mpstools/tasks/main.yml b/roles/mpstools/tasks/main.yml index 628859cd04932abcc7f5f6f342bfc56e1553de0a..159c816c4e7d275cfb3bd66b168acd4be26e7209 100644 --- a/roles/mpstools/tasks/main.yml +++ b/roles/mpstools/tasks/main.yml @@ -13,22 +13,10 @@ name: - git - make - - patchelf + - libncurses5 install_recommends: false force_apt_get: true -- name: Get current mpstools hash - set_fact: - mpstools_curr_hash: "{{ lookup('file', '/opt/mpstools/checksum', errors='ignore') }}" - -- name: Get new mpstools hash - stat: - path: "{{ role_path }}/files/mpstools.tgz" - checksum_algorithm: sha1 - get_checksum: true - delegate_to: localhost - register: mpstools_new - - name: Install toolchain become: true unarchive: @@ -36,30 +24,6 @@ group: root src: mpstools.tgz dest: /opt - keep_newer: true - when: mpstools_curr_hash != mpstools_new.stat.checksum - -# This has worked while testing but it is not a good way to solve the issue. -# It basically forces the executables to use the newer version of libncurses -- name: Patch arm debugger binaries to use libncurses.so.6 - become: true - shell: "ldd {{ item }} | grep libncurses.so.5 && patchelf --replace-needed libncurses.so.5 libncurses.so.6 {{ item }}; exit 0" - with_items: - - /opt/mpstools/bin/arm-v4t-eabi-insight - - /opt/mpstools/bin/arm-v4t-eabi-gdbtui - - /opt/mpstools/bin/arm-v4t-eabi-gdb - - /opt/mpstools/bin/arm-elf-insight - - /opt/mpstools/bin/arm-elf-eabi-insight - when: mpstools_curr_hash != mpstools_new.stat.checksum and patch_libncurses5_to_6 - -- name: Set toolchain checksum - become: true - copy: - owner: root - group: root - dest: /opt/mpstools/checksum - content: "{{ mpstools_new.stat.checksum }}" - when: mpstools_curr_hash != mpstools_new.stat.checksum - name: Add toolchain to PATH (for bash only) become: true