From 6cbff999d3ba1bf43bb7590e17a906a18b41893e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 1 Apr 2024 19:40:42 +0200 Subject: [PATCH] ci: Simplify identification and usage of dnf binary --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5cb03ac..ed73d92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,11 +29,15 @@ workflow: before_script: - echo 8096000 > /proc/sys/fs/inotify/max_user_instances - mkdir -m 700 $TMPDIR -p + - if command -v dnf5 &>/dev/null; then ln -sfv $(command -v dnf5) /usr/local/bin/dnf; fi - dnf update -y - - if [ -x /bin/dnf ]; then - dnf install -y $DEPENDENCIES $JOB_DEPS; - else - dnf5 install -y $DEPENDENCIES $JOB_DEPS; + - dnf install -y $DEPENDENCIES $JOB_DEPS + - if [ -n "$JOB_DEBUG_DEPS" ]; then + if command -v dnf5 + dnf install -y dnf4 + dnf4 update -y + dnf4 install -y "dnf-command(debuginfo-install); + dnf4 debuginfo-install -y $JOB_DEBUG_DEPS; fi pre_commit: