From 890f7365248565840173402e8a51e532f35330a1 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Thu, 1 Jun 2023 12:56:01 +0200 Subject: [PATCH] Fix dnf.conf in case a section is missed Resolves: #132 Signed-off-by: Sergio Arroutbi --- .github/workflows/install-dependencies | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/install-dependencies b/.github/workflows/install-dependencies index ee978acf..14943f9f 100755 --- a/.github/workflows/install-dependencies +++ b/.github/workflows/install-dependencies @@ -24,7 +24,16 @@ debian:*|ubuntu:*) ;; fedora:*) + grep -e '\[[a-z]*\]' /etc/dnf/dnf.conf || + { + printf '[main]\n' >> /etc/dnf/dnf.conf.fixed + cat /etc/dnf/dnf.conf >> /etc/dnf/dnf.conf.fixed + mv /etc/dnf/dnf.conf.fixed /etc/dnf/dnf.conf + } echo 'max_parallel_downloads=10' >> /etc/dnf/dnf.conf + echo '--------------- /etc/dnf/dnf.conf -------------' + cat /etc/dnf/dnf.conf + echo '--------------- /etc/dnf/dnf.conf -------------' dnf -y clean all dnf -y --setopt=deltarpm=0 update dnf -y install ${COMMON} pkgconfig openssl-devel zlib-devel jansson-devel