From e3c285c4cb5f7dbb748671b6518fa1675396622f Mon Sep 17 00:00:00 2001 From: nbenedek Date: Sun, 9 Apr 2023 19:46:55 +0200 Subject: [PATCH] ttrss: Completely uninstall app Set debconf values so that the database gets dropped when the package is removed Tests: * Install App and subscribe to a feed * Apply patches, then reinstall app: confirm the feed is purged * Functional tests passed Signed-off-by: nbenedek Reviewed-by: Sunil Mohan Adapa --- plinth/modules/ttrss/__init__.py | 2 +- plinth/modules/ttrss/privileged.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py index d8ad1b026..d6ec1327f 100644 --- a/plinth/modules/ttrss/__init__.py +++ b/plinth/modules/ttrss/__init__.py @@ -36,7 +36,7 @@ class TTRSSApp(app_module.App): app_id = 'ttrss' - _version = 3 + _version = 4 def __init__(self): """Create components for the app.""" diff --git a/plinth/modules/ttrss/privileged.py b/plinth/modules/ttrss/privileged.py index 8f53f0ff2..34778b596 100644 --- a/plinth/modules/ttrss/privileged.py +++ b/plinth/modules/ttrss/privileged.py @@ -20,7 +20,10 @@ DB_BACKUP_FILE = '/var/lib/plinth/backups-data/ttrss-database.sql' def pre_setup(): """Preseed debconf values before packages are installed.""" action_utils.debconf_set_selections( - ['tt-rss tt-rss/database-type string pgsql']) + ['tt-rss tt-rss/database-type string pgsql', + 'tt-rss tt-rss/purge boolean true', + 'tt-rss tt-rss/dbconfig-remove boolean true', + 'tt-rss tt-rss/dbconfig-reinstall boolean true']) @privileged