From 4933ff55b3ef11e42d89b924ea13a6e2c2aaaaa5 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sat, 29 Jul 2023 18:40:56 -0400 Subject: [PATCH] upgrades: Use n= in apt preferences In the Debian bookworm-backports repository, the Suite has changed to "stable-backports". The Codename is the more specific "bookworm-backports". Bump upgrades app version to rewrite the apt preferences file. Note: The app version is kept lower than the one in bookworm-backports currently (17). This is to ensure that additional setup steps are applied when the bookworm-backports package gets installed. Helps: #2368. Tests: - `apt policy freedombox` shows priority 500 for package in bookworm-backports. Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/upgrades/__init__.py | 2 +- plinth/modules/upgrades/privileged.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/upgrades/__init__.py b/plinth/modules/upgrades/__init__.py index 4a732df83..47825285d 100644 --- a/plinth/modules/upgrades/__init__.py +++ b/plinth/modules/upgrades/__init__.py @@ -52,7 +52,7 @@ class UpgradesApp(app_module.App): app_id = 'upgrades' - _version = 15 + _version = 16 can_be_disabled = False diff --git a/plinth/modules/upgrades/privileged.py b/plinth/modules/upgrades/privileged.py index b537702ae..fd020a8cb 100644 --- a/plinth/modules/upgrades/privileged.py +++ b/plinth/modules/upgrades/privileged.py @@ -33,7 +33,7 @@ APT_PREFERENCES_FREEDOMBOX = \ '''Explanation: This file is managed by FreedomBox, do not edit. Explanation: Allow carefully selected updates to 'freedombox' from backports. Package: src:freedombox -Pin: release a={}-backports +Pin: release n={}-backports Pin-Priority: 500 '''