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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/cnode-helper-scripts/guild-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

if [[ "${DISTRO}" =~ Rocky ]]; then
#RockyLinux 8/9
pkg_list="${pkg_list} --enablerepo=devel,crb libusbx ncurses-compat-libs pkgconf-pkg-config"
Expand All @@ -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

pkg_list="${pkg_list} libusbx ncurses-compat-libs pkgconf-pkg-config"
fi
if [[ "${LIBSODIUM_FORK}" == "Y" ]] || [[ "${WANT_BUILD_DEPS}" == "Y" ]]; then
Expand Down Expand Up @@ -266,7 +266,7 @@ os_dependencies() {
err_exit
fi
if [[ "${OS_ID}" =~ rhel ]] || [[ "${OS_ID}" =~ fedora ]] || [[ "${DISTRO}" =~ Fedora ]]; then
if [ -f /usr/lib64/libtinfo.so ] && [ -f /usr/lib64/libtinfo.so.5 ]; then
if [ -e /usr/lib64/libtinfo.so ] && [ -e /usr/lib64/libtinfo.so.5 ]; then
echo -e "\n Symlink updates not required for ncurse libs, skipping.."
else
echo -e "\n Updating symlinks for ncurse libs.."
Expand Down