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

Disable elivate repository to avoid detecting outdated version by prechecker and accedent update of the leapp packages #167

Merged
merged 1 commit into from
Jan 23, 2024
Merged
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
8 changes: 8 additions & 0 deletions actions/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ def _prepare_action(self) -> None:
if not rpm.is_package_installed("elevate-release"):
util.logged_check_call(["/usr/bin/yum", "install", "-y", "https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm"])

util.logged_check_call(["/usr/bin/yum-config-manager", "--enable", "elevate"])

util.logged_check_call(["/usr/bin/yum", "install", "-y"] + self.pkgs_to_install)
# We want to prevent the leapp packages from being updated accidentally to
# the latest version (for example by using 'yum update -y'). Therefore, we
# should disable the 'elevate' repository. Additionally, this will prevent
# the pre-checker from detecting leapp as outdated and prevent re-evaluation
# on the next restart.
util.logged_check_call(["/usr/bin/yum-config-manager", "--disable", "elevate"])

def _post_action(self) -> None:
rpm.remove_packages(rpm.filter_installed_packages(self.pkgs_to_install + ["elevate-release"]))
Expand Down
Loading