From 2cb5ae42b9c3828705c51dd823a1d7069ae5788e Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 29 Oct 2024 23:35:13 -0700 Subject: [PATCH] fix safednf --- mangle/generators/generate_versions_from_kpr | 6 ++++++ mangle/generators/generate_versions_from_ppr | 6 ++++++ mangle/generators/generate_versions_from_stream | 6 ++++++ mangle/generators/generate_versions_from_stream_10 | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/mangle/generators/generate_versions_from_kpr b/mangle/generators/generate_versions_from_kpr index 537771c..5c29631 100755 --- a/mangle/generators/generate_versions_from_kpr +++ b/mangle/generators/generate_versions_from_kpr @@ -9,6 +9,12 @@ else exit 1 fi +if [ -f /usr/bin/dnf4 ]; then + SAFEDNF=/usr/bin/dnf4 +else + SAFEDNF=/usr/bin/dnf +fi + export RLVER="${MAJOR}" source common diff --git a/mangle/generators/generate_versions_from_ppr b/mangle/generators/generate_versions_from_ppr index bf0f419..ec05228 100755 --- a/mangle/generators/generate_versions_from_ppr +++ b/mangle/generators/generate_versions_from_ppr @@ -13,6 +13,12 @@ if [ -n "$2" ] && [[ "$2" == "lh" ]]; then export LH="lh" fi +if [ -f /usr/bin/dnf4 ]; then + SAFEDNF=/usr/bin/dnf4 +else + SAFEDNF=/usr/bin/dnf +fi + export RLVER="${MAJOR}" source common diff --git a/mangle/generators/generate_versions_from_stream b/mangle/generators/generate_versions_from_stream index aa162f6..b1f5c51 100755 --- a/mangle/generators/generate_versions_from_stream +++ b/mangle/generators/generate_versions_from_stream @@ -18,6 +18,12 @@ if [ "$grep_val" -ne 0 ]; then echo "Date format incorrect. You must use: YYYYMMDD.X" fi +if [ -f /usr/bin/dnf4 ]; then + SAFEDNF=/usr/bin/dnf4 +else + SAFEDNF=/usr/bin/dnf +fi + export RLVER="${MAJOR}" source common diff --git a/mangle/generators/generate_versions_from_stream_10 b/mangle/generators/generate_versions_from_stream_10 index f8983ef..9966383 100755 --- a/mangle/generators/generate_versions_from_stream_10 +++ b/mangle/generators/generate_versions_from_stream_10 @@ -18,6 +18,12 @@ if [ "$grep_val" -ne 0 ]; then echo "Date format incorrect. You must use: YYYYMMDD.X" fi +if [ -f /usr/bin/dnf4 ]; then + SAFEDNF=/usr/bin/dnf4 +else + SAFEDNF=/usr/bin/dnf +fi + export RLVER="${MAJOR}" source common