From edc0199bc4a49df1b5b352faf8d5c8f358abd037 Mon Sep 17 00:00:00 2001 From: Sandeep Yadav Date: Tue, 18 Jan 2022 14:57:27 +0530 Subject: [PATCH] Base container - Fix bash condition for rhel case This is to fix regression from [1] which is breaking container build in downstream as its not enabling correct dnf stream for rhel8 case. Also, We can see below in logs:- ~~~ /bin/sh: line 1: [: missing `]' ~~~ With this patch, We are correcting the bash condition as per guidelines for logical operator for bash in [2]. [1] https://review.opendev.org/c/openstack/tripleo-common/+/823846 [2] https://tecadmin.net/use-logical-or-and-in-shell-script/ Closes-Bug: rhbz#2041484 Change-Id: Ib9a712eb1fb225b97f6b1f19a42ddd15c6ce537b --- container-images/tcib/base/base.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-images/tcib/base/base.yaml b/container-images/tcib/base/base.yaml index 859828372..c719e86e9 100644 --- a/container-images/tcib/base/base.yaml +++ b/container-images/tcib/base/base.yaml @@ -15,7 +15,7 @@ tcib_actions: crudini --set /etc/dnf/dnf.conf main skip_missing_names_on_install False && crudini --set /etc/dnf/dnf.conf main tsflags nodocs - run: >- - if [ '{{ tcib_distro }}' == 'rhel' && '{{ tcib_release }}' == '8' ]; then + if [ '{{ tcib_distro }}' == 'rhel' ] && [ '{{ tcib_release }}' == '8' ]; then {%- if "el" ~ tcib_release in tcib_packages.modules %} {% for item in tcib_packages.modules["el" ~ tcib_release] %}{% set key, value = (item.items() | list).0 %}dnf module -y {{ key }} {{ value }}; {% endfor %} {%- else %}