Skip to content

Commit fa6431e

Browse files
committed
[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 c03188b commit fa6431e

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
@@ -240,19 +240,23 @@ RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc \
240240
{% if base_distro == 'debian' %}
241241
RUN rm -f /etc/apt/sources.list.d/debian.sources
242242
COPY sources.list.{{ base_distro }} /etc/apt/sources.list
243-
{% elif ( base_distro == 'ubuntu' and base_arch == 'x86_64' ) %}
243+
{% elif base_distro == 'ubuntu' %}
244244
{% if base_distro_tag.startswith('22.04') or base_distro_tag.startswith('jammy') %}
245+
RUN rm -f /etc/apt/sources.list
246+
{% if base_arch == 'x86_64' %}
245247
COPY sources.list.{{ base_distro }}.jammy /etc/apt/sources.list
248+
{% else %}
249+
COPY sources.list.{{ base_distro }}.jammy.{{ base_arch }} /etc/apt/sources.list
250+
{% endif %}
246251
{% elif base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble') %}
252+
RUN rm -f /etc/apt/sources.list.d/{{ base_distro }}.sources
253+
{% if base_arch == 'x86_64' %}
247254
COPY sources.list.{{ base_distro }}.noble /etc/apt/sources.list
248-
{% endif %}
249255
{% else %}
250-
{% if base_distro_tag.startswith('22.04') or base_distro_tag.startswith('jammy')%}
251-
COPY sources.list.{{ base_distro }}.jammy.{{ base_arch }} /etc/apt/sources.list
252-
{% elif base_distro_tag.startswith('24.04') or base_distro_tag.startswith('noble')%}
253256
COPY sources.list.{{ base_distro }}.noble.{{ base_arch }} /etc/apt/sources.list
254257
{% endif %}
255258
{% endif %}
259+
{% endif %}
256260
COPY sources.list /etc/apt/sources.list.d/kolla-custom.list
257261
{% endblock %}
258262

0 commit comments

Comments
 (0)