Store: add repositories in a background job and show the TOFU fingerprint

Adding a repository downloads and verifies its whole index, so it now runs as a
job (runJob in the UI) and reports 'Trusted on first use: <fingerprint>' when
no pin was given. fdroidrepos:// links pass the server check, as documented.
Jobs report SourceError messages without a 'SourceError:' prefix.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-28 22:13:04 +10:00
1 parent ddcf3b2ad2
commit a9d78679ec
5 files changed
+62 -13

No files matched your search

+9 -3
View File
@@ -98,10 +98,16 @@ def set_enabled(source_id, enabled):
return {'message': source['name'] + (' enabled' if enabled else ' disabled')}
def repo_module():
module = next((m for m in modules()[0] if m.KIND == 'fdroid'), None)
if module is None or not hasattr(module, 'add_repo'):
raise SourceError('User repositories are not available in this build')
return module
def manage_repo(action, **kwargs):
mods, _ = modules()
module = next((m for m in mods if m.KIND == 'fdroid'), None)
if module is None or not hasattr(module, action):
module = repo_module()
if not hasattr(module, action):
raise SourceError('User repositories are not available in this build')
return getattr(module, action)(**kwargs)