From 3e6fcd6c78d562a920749abf3a9e129eb87ad285 Mon Sep 17 00:00:00 2001 From: Grzegorz Koper Date: Fri, 18 Jul 2025 15:25:47 +0200 Subject: [PATCH] [fix] Make sure all the sources from the build are removed We need to make sure all the sources from kolla build are being removed, because since ubuntu noble: ``` Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources file, which uses the deb822 format. Use deb822-formatted .sources files to manage package sources in the /etc/apt/sources.list.d/ directory. See the sources.list(5) manual page for details. ``` --- etc/kayobe/kolla.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml index 02e40dc76..c0e8119cb 100644 --- a/etc/kayobe/kolla.yml +++ b/etc/kayobe/kolla.yml @@ -259,7 +259,8 @@ kolla_build_blocks: {% endfor %} {% else %} RUN \ - rm /etc/apt/sources.list && \ + rm -f /etc/apt/sources.list && \ + rm -f /etc/apt/sources.list.d/* && \ {% if stackhpc_repo_mirror_auth_proxy_enabled | bool %} {# We lack the ca-certificates package at this stage, so don't verify the CA initially #} echo 'Acquire::https::Verify-Peer "false";' > /etc/apt/apt.conf.d/90no-verify-peer && \ @@ -291,7 +292,8 @@ kolla_build_blocks: COPY sources.list.ubuntu /etc/apt/sources.list.backup {% endif %} RUN \ - rm /etc/apt/sources.list && \ + rm -f /etc/apt/sources.list && \ + rm -f /etc/apt/sources.list.d/* && \ rm -f /etc/apt/apt.conf.d/90no-verify-peer && \ {% for repo in stackhpc_ubuntu_noble_repos %} echo '{{ repo }}' >> /etc/apt/sources.list {% if not loop.last %} && \