From 20c97c5ce3d81bafb4025cb30d91bea7a83e7f42 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Wed, 21 Aug 2019 15:16:20 -0700 Subject: [PATCH] tt-rss: Force upgrade to 18.12-1.1 and beyond Force upgrade to any lower version to version less than or equal to 19.8.*. config.php is the only configuration file for tt-rss app the FreedomBox modifies. Comparison of config.php from 19.8 shows that there are no major changes since 18.12. Changes to the configuration file are likely to be minor and from Debian packaging. Force upgrading to all versions until 19.8.* should be okay by retaining new configuration and performing FreedomBox changes on top everything new configuration file is installed. Tests: - Install tt-rss version 18.12-1 using a test repository and custom priority. Then remove the custom priority and trigger 'apt update'. This will trigger an force upgrade of tt-rss to version 18.12-1.1. Verify that the tt-rss interface is available and functional. - Install tt-rss version 18.12-1.1 freshly. Verify that the tt-rss interface is available and functional. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/ttrss/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py index db0633468..fa5ce8dcc 100644 --- a/plinth/modules/ttrss/__init__.py +++ b/plinth/modules/ttrss/__init__.py @@ -125,10 +125,9 @@ def force_upgrade(helper, packages): if 'tt-rss' not in packages: return False - # tt-rss 17.4 -> 18.12 + # Allow tt-rss any lower version to upgrade to 19.8.* package = packages['tt-rss'] - if Version(package['current_version']) >= Version('18.12') or \ - Version(package['new_version']) < Version('18.12'): + if Version(package['new_version']) > Version('19.9~'): return False helper.install(['tt-rss'], force_configuration='new')