mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
main: Run package operations immediately after startup
- When service is started, check if there are any configuration file prompts pending and perform package updates. - When service is started, check if there are any package version updates that require app re-run. - These operations are done in the same thread that does app version upgrade. All three operations don't race against each other for apt lock. On the downside, some operations may get delayed if previous operation fails temporarily. Tests: - After service starts, after 'Setup completed' message we can see messages 'Attempting to perform post-dpkg operations', 'Completed post-dpkg operations', 'Attempting to perform upgrade', and 'Completed upgrade'. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
2ceb80607a
commit
bc116e028a
@ -102,8 +102,17 @@ def run_post_init_and_setup():
|
||||
"""Run post-init operations on the apps and setup operations."""
|
||||
app_module.apps_post_init()
|
||||
frontpage.add_custom_shortcuts()
|
||||
|
||||
# Handle app version updates.
|
||||
setup.run_setup_on_startup() # Long running, retrying
|
||||
|
||||
# Handle packages that have been updated else where that need a re-run of
|
||||
# setup.
|
||||
setup.on_dpkg_invoked()
|
||||
|
||||
# Handle packages that have a pending configuration file prompt.
|
||||
setup.on_package_cache_updated()
|
||||
|
||||
|
||||
def main():
|
||||
"""Initialize and start the application"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user