ttrss: Ensure that database is removed after uninstall

- Setting ttrss/purge to 'true' in debconf is not retrained after the package
has been install. So, set it again just before package removal.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2024-03-15 16:13:54 -07:00 committed by James Valleroy
parent 7c5c960400
commit fdaba80de3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 13 additions and 0 deletions

View File

@ -120,6 +120,11 @@ class TTRSSApp(app_module.App):
if not old_version:
self.enable()
def uninstall(self):
"""De-configure and uninstall the app."""
privileged.uninstall()
super().uninstall()
def force_upgrade(self, packages):
"""Force update package to resolve conffile prompts."""
if 'tt-rss' not in packages:

View File

@ -171,3 +171,11 @@ def load_augeas():
aug.set('/augeas/load/Phpvars/incl[last() + 1]', DATABASE_FILE)
aug.load()
return aug
@privileged
def uninstall():
"""Ensure that the database is removed."""
# This setting set before deb package installation is not retrained,
# somehow.
action_utils.debconf_set_selections(['tt-rss tt-rss/purge boolean true'])