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 <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalpati 2017-09-01 15:44:22 +05:30 committed by James Valleroy
parent 9369f72c4f
commit bb5571b7ab
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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()