Skip to content

Commit 2d76499

Browse files
grzegorzkoperAlex-Welsh
authored andcommitted
[2024.1 only] Add conditionals for Ubuntu Jammy
This commit aligns Ubuntu Jammy behavior with Debian and Ubuntu Noble by explicitly removing appropriate `.sources` files and relying solely on the sources configured by Kolla. This ensures consistent and reproducible builds both in CI and on local environments. Closes-Bug: #2112140 Change-Id: Icfb64a4e2b39e722cb88e72f8f2605379484b54a Signed-off-by: Grzegorz Koper <[email protected]>
1 parent d7686f3 commit 2d76499

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docker/base/Dockerfile.j2

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,23 @@ RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc \
241241
{% if base_distro == 'debian' %}
242242
RUN rm -f /etc/apt/sources.list.d/debian.sources
243243
COPY sources.list.{{ base_distro }} /etc/apt/sources.list
244-
{% elif ( base_distro == 'ubuntu' and base_arch == 'x86_64' ) %}
244+
{% elif base_distro == 'ubuntu' %}
245245
{% if base_distro_tag.startswith('22.04') or base_distro_tag.startswith('jammy') %}
246+
RUN rm -f /etc/apt/sources.list
247+
{% if base_arch == 'x86_64' %}
246248
COPY sources.list.{{ base_distro }}.jammy /etc/apt/sources.list
249+
{% else %}
250+
COPY sources.list.{{ base_distro }}.jammy.{{ base_arch }} /etc/apt/sources.list
251+
{% endif %}
247252
{% elif base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble') %}
253+
RUN rm -f /etc/apt/sources.list.d/{{ base_distro }}.sources
254+
{% if base_arch == 'x86_64' %}
248255
COPY sources.list.{{ base_distro }}.noble /etc/apt/sources.list
249-
{% endif %}
250256
{% else %}
251-
{% if base_distro_tag.startswith('22.04') or base_distro_tag.startswith('jammy')%}
252-
COPY sources.list.{{ base_distro }}.jammy.{{ base_arch }} /etc/apt/sources.list
253-
{% elif base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble')%}
254257
COPY sources.list.{{ base_distro }}.noble.{{ base_arch }} /etc/apt/sources.list
255258
{% endif %}
256259
{% endif %}
260+
{% endif %}
257261
COPY sources.list /etc/apt/sources.list.d/kolla-custom.list
258262
{% endblock %}
259263

0 commit comments

Comments
 (0)