From bb5571b7abfe8713a965b3f1cb6fb78281a90b4b Mon Sep 17 00:00:00 2001 From: Joseph Nuthalpati Date: Fri, 1 Sep 2017 15:44:22 +0530 Subject: [PATCH] first-run: Skip installation of essential modules from Plinth - Essential modules would be installed by apt as they are already dependencies of plinth. - Plinth trying to trigger an installation is unnecessary. - Plinth installing deb packages might also cause problems with plinth startup if automatic upgrades are running. - Added back the --setup option - setup doesn't run when something else like diagnostics is invoked Signed-off-by: Joseph Nuthalpati Reviewed-by: James Valleroy --- plinth/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plinth/__main__.py b/plinth/__main__.py index d23a3d1a2..d32b54cff 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -348,7 +348,8 @@ def main(): module_loader.load_modules() - run_setup(arguments.setup) + if arguments.setup is not False: + run_setup_and_exit(arguments.setup, allow_install=True) if arguments.setup_no_install is not False: run_setup_and_exit(arguments.setup_no_install, allow_install=False) @@ -362,6 +363,10 @@ def main(): if arguments.diagnose: run_diagnostics_and_exit() + # Run setup steps for essential modules + # Installation is not necessary as they are dependencies of Plinth + run_setup(None, allow_install=False) + setup_server() cherrypy.engine.start()