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/cinder/cinder-volume/Dockerfile.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docker/cinder/cinder-volume') diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index 8cb7e28b5..329ef49b4 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -9,7 +9,7 @@ MAINTAINER {{ maintainer }} 'scsi-target-utils' ] %} -RUN {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% block cinder_volume_redhat_setup %} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf @@ -21,7 +21,7 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/tgtd.conf 'tgt' ] %} -RUN {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% block cinder_volume_ubuntu_setup %} RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf @@ -36,7 +36,7 @@ RUN sed -i '1 i include /var/lib/cinder/volumes/*' /etc/tgt/targets.conf 'cinder-volume' ] %} -RUN {{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} +{{ macros.install_packages(cinder_volume_packages | customizable("packages")) }} {% endif %} {% endif %} -- cgit v1.2.3