From 99c8cda3efc029dabfd525d0c6d05b1fef876a5e Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Fri, 10 Nov 2023 10:25:25 -0500 Subject: [PATCH] ansible: Exclude cross compiler packages not available in Debian/i386 Change-Id: I05ee89ccf407b42ee026d3c5eb70549a05037016 --- .../ansible/roles/cross-compilers/tasks/setup-Debian.yml | 3 ++- .../ansible/roles/cross-compilers/vars/Debian-11.yml | 5 +++++ .../ansible/roles/cross-compilers/vars/Debian-sid.yml | 6 ++++++ .../ansible/roles/cross-compilers/vars/Debian-trixie.yml | 6 ++++++ automation/ansible/roles/cross-compilers/vars/Debian.yml | 9 +++++++++ 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml index bb7152e..4eb8363 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml @@ -16,7 +16,8 @@ update_cache: true - name: Ensure cross-compilers packages are installed. - apt: "name={{ cross_compilers_packages }} state=present" + ansible.builtin.apt: + name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture}}', default=[]))}}" - name: Install legacy cross compilers when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' and compilers_legacy_install diff --git a/automation/ansible/roles/cross-compilers/vars/Debian-11.yml b/automation/ansible/roles/cross-compilers/vars/Debian-11.yml index cff0cde..dfe2321 100644 --- a/automation/ansible/roles/cross-compilers/vars/Debian-11.yml +++ b/automation/ansible/roles/cross-compilers/vars/Debian-11.yml @@ -23,3 +23,8 @@ cross_compilers_packages: - gcc-9-powerpc-linux-gnu - gcc-9-riscv64-linux-gnu - gcc-9-s390x-linux-gnu + +cross_compilers_packages_exclude_i386: + - gcc-i686-linux-gnu + - gcc-10-i686-linux-gnu + - gcc-9-i686-linux-gnu diff --git a/automation/ansible/roles/cross-compilers/vars/Debian-sid.yml b/automation/ansible/roles/cross-compilers/vars/Debian-sid.yml index 1a14b32..12311b9 100644 --- a/automation/ansible/roles/cross-compilers/vars/Debian-sid.yml +++ b/automation/ansible/roles/cross-compilers/vars/Debian-sid.yml @@ -31,3 +31,9 @@ cross_compilers_packages: - gcc-11-powerpc-linux-gnu - gcc-11-riscv64-linux-gnu - gcc-11-s390x-linux-gnu + +cross_compilers_packages_exclude_i386: + - gcc-i686-linux-gnu + - gcc-13-i686-linux-gnu + - gcc-12-i686-linux-gnu + - gcc-11-i686-linux-gnu diff --git a/automation/ansible/roles/cross-compilers/vars/Debian-trixie.yml b/automation/ansible/roles/cross-compilers/vars/Debian-trixie.yml index 1a14b32..12311b9 100644 --- a/automation/ansible/roles/cross-compilers/vars/Debian-trixie.yml +++ b/automation/ansible/roles/cross-compilers/vars/Debian-trixie.yml @@ -31,3 +31,9 @@ cross_compilers_packages: - gcc-11-powerpc-linux-gnu - gcc-11-riscv64-linux-gnu - gcc-11-s390x-linux-gnu + +cross_compilers_packages_exclude_i386: + - gcc-i686-linux-gnu + - gcc-13-i686-linux-gnu + - gcc-12-i686-linux-gnu + - gcc-11-i686-linux-gnu diff --git a/automation/ansible/roles/cross-compilers/vars/Debian.yml b/automation/ansible/roles/cross-compilers/vars/Debian.yml index 32a8a35..45e8723 100644 --- a/automation/ansible/roles/cross-compilers/vars/Debian.yml +++ b/automation/ansible/roles/cross-compilers/vars/Debian.yml @@ -7,6 +7,7 @@ cross_compilers_packages: - gcc-powerpc-linux-gnu - gcc-riscv64-linux-gnu - gcc-s390x-linux-gnu + - gcc-12-aarch64-linux-gnu - gcc-12-arm-linux-gnueabihf - gcc-12-i686-linux-gnu @@ -14,6 +15,7 @@ cross_compilers_packages: - gcc-12-powerpc-linux-gnu - gcc-12-riscv64-linux-gnu - gcc-12-s390x-linux-gnu + - gcc-11-aarch64-linux-gnu - gcc-11-arm-linux-gnueabihf - gcc-11-i686-linux-gnu @@ -23,4 +25,11 @@ cross_compilers_packages: # be fetched from a snapshot source instead - gcc-11-powerpc-linux-gnu - gcc-11-riscv64-linux-gnu + +# Packages not available on i386 +cross_compilers_packages_exclude_i386: + - gcc-i686-linux-gnu + - gcc-12-i686-linux-gnu + - gcc-11-i686-linux-gnu + cross_compilers_debian_bookworm_snapshot: true -- 2.34.1