From 8a7e70aab28a9c514038df10dd377379bffdc98a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 24 Feb 2026 21:14:40 -0800 Subject: [PATCH] gitweb: Fix issue with running post init due to missing method Fixes: #2563. Also see https://salsa.debian.org/freedombox-team/freedombox/-/merge_requests/2740 Test: - Functional tests for gitweb pass. - Without the patch, install gitweb and enable it. Restart FreedomBox service. The error message in #2563 is reproduced. With the patch, the error disappears. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/gitweb/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plinth/modules/gitweb/__init__.py b/plinth/modules/gitweb/__init__.py index 5412ed193..2ebd419d8 100644 --- a/plinth/modules/gitweb/__init__.py +++ b/plinth/modules/gitweb/__init__.py @@ -145,6 +145,17 @@ class GitwebWebserverAuth(Webserver): if not have_public_repos(repos): super().enable() + def set_enabled(self, enabled): + """Update the internal enabled state of the component. + + Actually do nothing. This method is called when is_leader = False to + notify the enabled/disabled state of the app. Enabled/disabled state of + this component is actually decided by the webserver configuration. It + is expected that is_enabled is not called on this component to + determine if app is enabled or not. + """ + pass + class GitwebBackupRestore(BackupRestore): """Component to handle backup/restore for Gitweb."""