commit f13eb1bceadad82e45df5db5c63dc13a1ae6167c Author: Javier Pena Date: Mon Oct 5 10:27:51 2020 +0200 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 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 4a26811..91c1662 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