Ensure lsb-release exists on debian/ubuntu

Change-Id: I74142928d97af932a04e33476771360579e01ee7
Closes-Bug: #1853474
This commit is contained in:
Dincer Celik 2019-11-22 10:36:38 +03:00 committed by Marcin Juszkiewicz
parent 666531893c
commit 05c84fdf86
2 changed files with 5 additions and 3 deletions

View File

@ -277,8 +277,10 @@ RUN yum-config-manager --enable rhel-7-server-optional-rpms \
{# endif for install type is source for RPM based distros #}
{# endif for base_package_type rpm #}
{% elif base_package_type == 'deb' %}
# Ensure lsb_release exists
{{ macros.install_packages(['lsb-release']) }}
RUN if [ $(awk -F '=' '/DISTRIB_RELEASE/{print $2}' /etc/lsb-release) != "{{ supported_distro_release }}" ]; then \
RUN if [ $(lsb_release -r -s) != "{{ supported_distro_release }}" ]; then \
echo "Only release '{{ supported_distro_release }}' is supported on {{ base_distro }}"; false; fi
# Customize PS1 bash shell

View File

@ -24,13 +24,13 @@ BASE_ARCH = ['x86_64', 'ppc64le', 'aarch64']
DEFAULT_BASE_TAGS = {
'centos': '7',
'rhel': '7',
'debian': 'buster',
'debian': '10',
'ubuntu': '18.04',
}
DISTRO_RELEASE = {
'centos': '7',
'rhel': '7',
'debian': 'buster',
'debian': '10',
'ubuntu': '18.04',
}
OPENSTACK_RELEASE = 'master'