get 'apt_*' options of kolla-build.conf working again

We broke 'apt_sources_list' and 'apt_preferences' options quite a while
ago. Turned out that fix is quite simple.

This change adds empty sources.list and apt-preferences files which are
always added into images. If kolla-build.conf will use any of APT
related options then those files will be replaced with provided ones.

Change-Id: I7bbdcbd5c60f654a484a872209e0537e3950346c
Closes-bug: #1706549
This commit is contained in:
Marcin Juszkiewicz 2019-10-17 03:36:17 -07:00
parent fd5bff9cf1
commit bf20b41e7d
3 changed files with 4 additions and 0 deletions

View File

@ -315,10 +315,12 @@ COPY sources.list.{{ base_distro }} /etc/apt/sources.list
{% else %} {% else %}
COPY sources.list.{{ base_distro }}.{{ base_arch }} /etc/apt/sources.list COPY sources.list.{{ base_distro }}.{{ base_arch }} /etc/apt/sources.list
{% endif %} {% endif %}
COPY sources.list /etc/apt/sources.list.d/kolla-custom.list
{% endblock %} {% endblock %}
{% block base_ubuntu_package_apt_preferences %} {% block base_ubuntu_package_apt_preferences %}
COPY apt_preferences.{{ base_distro }} /etc/apt/preferences COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
COPY apt_preferences /etc/apt/preferences.d/kolla-custom
{% endblock %} {% endblock %}
{% set base_apt_packages = [ {% set base_apt_packages = [

View File

@ -0,0 +1 @@
# used for adding custom options by 'apt_preferences' option of kolla-build.conf

1
docker/base/sources.list Normal file
View File

@ -0,0 +1 @@
# used for adding custom repos by 'apt_sources_list' option of kolla-build.conf