Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhel/fedora fixes #1851

Open
wants to merge 3 commits into
base: alpha
Choose a base branch
from
Open

rhel/fedora fixes #1851

wants to merge 3 commits into from

Conversation

Scitz0
Copy link
Contributor

@Scitz0 Scitz0 commented Feb 3, 2025

Description

guild-deploy fixes for recent RHEL / Fedora versions

@Scitz0 Scitz0 requested a review from rdlrt February 3, 2025 22:26
@@ -229,7 +229,7 @@ os_dependencies() {
pkg_list="${pkg_list} libusb ncurses-compat-libs pkgconfig"
elif [[ "${VERSION_ID}" =~ "8" ]] || [[ "${VERSION_ID}" =~ "9" ]]; then
#RHEL/CentOS/RockyLinux 8/9
pkg_opts="${pkg_opts} --allowerasing"
if ${pkgmgrcmd} -h | grep -q "\--allowerasing"; then pkg_opts="${pkg_opts} --allowerasing"; fi
Copy link
Collaborator

@TrevorBenson TrevorBenson Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for dnf v4 as the root usage menu displays this as a General DNF option. However, in dnf v5 --allowerasing no longer visible here, it is only visible in the usage for Options of the applicable subcommands.

This can be used to achieve your goal as both v4 and v5 list this in the usage menu for the install and update subcommands:

Suggested change
if ${pkgmgrcmd} -h | grep -q "\--allowerasing"; then pkg_opts="${pkg_opts} --allowerasing"; fi
if ${pkgmgrcmd} install -h | grep -q "\--allowerasing"; then pkg_opts="${pkg_opts} --allowerasing"; fi

@@ -238,7 +238,7 @@ os_dependencies() {
fi
elif [[ "${DISTRO}" =~ Fedora ]]; then
#Fedora
pkg_opts="${pkg_opts} --allowerasing"
if ${pkgmgrcmd} -h | grep -q "\--allowerasing"; then pkg_opts="${pkg_opts} --allowerasing"; fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above comment for dnf v4 vs. v5:

Suggested change
if ${pkgmgrcmd} -h | grep -q "\--allowerasing"; then pkg_opts="${pkg_opts} --allowerasing"; fi
if ${pkgmgrcmd} install -h | grep -q "\--allowerasing"; then pkg_opts="${pkg_opts} --allowerasing"; fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants