Skip to content

Commit 3afcfab

Browse files
author
Mikhail Sandakov
committed
Disable elivate repository to avoid detecting outdated version by pre-checker and accedent update of the leapp packages
1 parent ebe02da commit 3afcfab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

actions/installation.py

+8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ def _prepare_action(self) -> None:
1919
if not rpm.is_package_installed("elevate-release"):
2020
util.logged_check_call(["/usr/bin/yum", "install", "-y", "https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm"])
2121

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

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

0 commit comments

Comments
 (0)