Skip to content

Commit

Permalink
Mark AdoptAptRepositories action as required to revert even if it failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sandakov committed Jan 17, 2025
1 parent 5738a85 commit 45ad1e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pleskdistup/actions/distupgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ def __init__(
def name(self):
return self._name.format(self=self)

def _is_revert_after_fail_required(self) -> bool:
# We might encounter a failure during the 'apt update' process.
# If this occurs, it's necessary to undo any modifications made to the sources.list files.
# Not doing so could stop us from performing 'apt update' in future rollback operations. And we stuck.
return True

def _process_file(self, fpath: str) -> None:
files.backup_file(fpath)

Expand Down

0 comments on commit 45ad1e9

Please sign in to comment.