From f13eb1bceadad82e45df5db5c63dc13a1ae6167c Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Mon, 5 Oct 2020 10:27:51 +0200 Subject: [PATCH] Ensure yum-utils is installed in epel element We are running yum-config-manager/dnf config-manager in the epel element. Even though the yum-utils package is declared in the package-installs.yaml file, the package-installs pre-install.d script is executed after the one in the epel element, so image build fails. This commit ensures yum-utils or dnf-plugins-core are installed before running the command. Change-Id: Ib292b0b2b31bd966e0c5e8f2b2ce560bba89c45c --- .../elements/epel/pre-install.d/05-rpm-epel-release | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release b/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release index 4a268119d..91c166240 100755 --- a/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release +++ b/diskimage_builder/elements/epel/pre-install.d/05-rpm-epel-release @@ -35,8 +35,11 @@ fi if [ ${DIB_EPEL_DISABLED:-0} -ne 0 ]; then if [[ ${YUM} == "dnf" ]]; then + rpm -q dnf-plugins-core || dnf install -y dnf-plugins-core dnf config-manager --set-disabled "epel*" else + # Cannot rely on package-installs, it is executed later + rpm -q yum-utils || yum install -y yum-utils yum-config-manager --disable "epel*" fi fi