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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-08-21 15:16:20 -07:00 committed by James Valleroy
parent 4b8b2e171c
commit 20c97c5ce3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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')