From d7d4958e8b090c19bdd3d083e57c3c1a41131dca Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Wed, 18 Jun 2025 20:25:05 -0400 Subject: [PATCH] performance: Handle install for trixie In trixie, cockpit-pcp is replaced by cockpit-bridge. However, our packages module does not properly handle virtual packages. - Specify cockpit-bridge and pcp as dependencies. In bookworm, they were dependencies of cockpit-pcp. - Allow cockpit-bridge as a substitute for cockpit-pcp. Tests: - In stable container, install Performance app. Install succeeds and app is available. - In testing container, install Performance app. Install succeeds and app is available. - Build stable-backports package with new version. Install in stable VM. Install Performance app. Check that dist-upgrade succeeds. After dist-upgrade, Performance app is still working. Uninstalling Performance app works. Installing Performance app works. Diagnostics are all passed. Note: There is one minor issue with the Diagnostics. Package cockpit-bridge line is shown twice (both are passed). Fixes: #2475 Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/modules/performance/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plinth/modules/performance/__init__.py b/plinth/modules/performance/__init__.py index ced77abd4..70b80f0d4 100644 --- a/plinth/modules/performance/__init__.py +++ b/plinth/modules/performance/__init__.py @@ -9,7 +9,7 @@ from plinth import app as app_module from plinth import menu from plinth.daemon import Daemon from plinth.modules.backups.components import BackupRestore -from plinth.package import Packages +from plinth.package import Package, Packages from . import manifest @@ -49,7 +49,15 @@ class PerformanceApp(app_module.App): order=40) self.add(menu_item) - packages = Packages('packages-performance', ['cockpit-pcp']) + packages = Packages('packages-performance', [ + # For bookworm, we need cockpit-pcp (which depends on + # cockpit-bridge and pcp). For trixie, cockpit-pcp is + # replaced by cockpit-bridge, and we need to specify a + # dependency on pcp. There is some issue with having a + # virtual package specified, see #2475. + Package('cockpit-pcp') | Package('cockpit-bridge'), + 'cockpit-bridge', 'pcp' + ]) self.add(packages) backup_restore = BackupRestore('backup-restore-performance',