Skip to content

Commit

Permalink
Remove all system_upgrade links from leapp repos directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sandakov committed Sep 6, 2024
1 parent 3814c62 commit 620c7a9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions centos2almaconverter/actions/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import shutil

from pleskdistup.common import action, rpm, util
from pleskdistup.common import action, files, rpm, util


class LeapInstallation(action.ActiveAction):
Expand All @@ -23,9 +23,8 @@ def _remove_previous_installation(self) -> None:

# The directory contains leapp-data package configurations, which causes problems with
# the package installation. So we have to remove it, to reinstall package from scratch.
conflict_directory = "/etc/leapp/repos.d/system_upgrade"
if os.path.exists(conflict_directory):
shutil.rmtree(conflict_directory)
for system_upgrade_link in files.find_files_case_insensitive("/etc/leapp/repos.d", "system_upgrade*"):
os.unlink(system_upgrade_link)

def _prepare_action(self) -> action.ActionResult:
if not rpm.is_package_installed("elevate-release"):
Expand Down

0 comments on commit 620c7a9

Please sign in to comment.