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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2026-02-24 21:14:40 -08:00 committed by James Valleroy
parent 11d58134e5
commit 8a7e70aab2
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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."""