Skip to content

Commit

Permalink
updater: auto-resolve conffiles conflicts only if qubes-updater is used
Browse files Browse the repository at this point in the history
previous version change behavior permanently

(cherry picked from commit d3ea822)
  • Loading branch information
piotrbartman authored and marmarek committed Nov 5, 2024
1 parent bb8436f commit ddd42e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 38 deletions.
2 changes: 2 additions & 0 deletions vmupdate/agent/source/apt/apt_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def upgrade_internal(self, remove_obsolete: bool) -> ProcessResult:
Path(os.path.join(
apt_pkg.config.find_dir("Dir::Cache::Archives"), "partial")
).mkdir(parents=True, exist_ok=True)
apt_pkg.config.set('Dpkg::Options::', "--force-confdef")
apt_pkg.config.set('Dpkg::Options::', "--force-confold")
self.log.debug("Committing upgrade...")
self.apt_cache.commit(
self.progress.fetch_progress,
Expand Down
5 changes: 4 additions & 1 deletion vmupdate/agent/source/apt/apt_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def get_action(self, remove_obsolete: bool) -> List[str]:
"""
Return command `upgrade` or `dist-upgrade` if `remove_obsolete`.
"""
result = ["-y"]
result = ["-y",
"-o", 'Dpkg::Options::=--force-confdef',
"-o", 'Dpkg::Options::=--force-confold'
]
result += ["dist-upgrade"] if remove_obsolete else ["upgrade"]
return result

Expand Down
37 changes: 0 additions & 37 deletions vmupdate/agent/source/plugins/apt_keep_old_conffiles.py

This file was deleted.

0 comments on commit ddd42e9

Please sign in to comment.