From a9d08726f5a48eef77c04ea1acefc00d93ce7076 Mon Sep 17 00:00:00 2001 From: Shaun Smekel Date: Fri, 12 Aug 2016 08:24:11 +1000 Subject: Handle empty package list for install_packages Currently if the install_packages macro is run with an empty package list, it will add a yum or apt-get command with no packages listed. This bug fix aims to omit this line when no packages have been given, or, the operator wants to use the "_override" / "_remove" functionality to disable all packages being installed in a Dockerfile. Co-Authored-By: Paul Bourke Change-Id: Ifaaaebfccc3adb0f2f68a35ac08e59378bc87fdb Closes-bug: 1612446 --- docker/openstack-base/Dockerfile.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docker/openstack-base') diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index 9b5809786..300adbec7 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -10,7 +10,7 @@ MAINTAINER {{ maintainer }} 'openssl' ] %} -RUN {{ macros.install_packages(openstack_base_packages) }} +{{ macros.install_packages(openstack_base_packages) }} {% endif %} {% if install_type == 'binary' %} @@ -185,7 +185,7 @@ ENV DEBIAN_FRONTEND noninteractive ] %} {% endif %} -RUN {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} +{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} {% elif install_type == 'source' %} {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} @@ -221,7 +221,7 @@ RUN {{ macros.install_packages(openstack_base_packages | customizable("packages" ] %} {% endif %} -RUN {{ macros.install_packages(openstack_base_packages | customizable("packages")) }} +{{ macros.install_packages(openstack_base_packages | customizable("packages")) }} ADD openstack-base-archive /openstack-base-source RUN ln -s openstack-base-source/* /requirements \ && mkdir -p /var/lib/kolla \ -- cgit v1.2.3