acloud: mkcert should be installed alone when connect to webrtc.
mkcert should install alone and should not invoke all host install process.
Bug: 204193944
Test: remove .config/acloud/mkcert folder && acloud hostcleanup && acloud-dev create --local-image
Change-Id: Ifc0103ab4d8c1ee31d3a02e799008f989c3750e9
diff --git a/create/create.py b/create/create.py
index 0337099..392fc34 100644
--- a/create/create.py
+++ b/create/create.py
@@ -191,17 +191,19 @@
if host_pkg_setup.ShouldRun():
args.host = True
+ setup_mkcert = False
if args.autoconnect == constants.INS_KEY_WEBRTC:
mkcert_pkg_setup = host_setup_runner.MkcertPkgInstaller()
if mkcert_pkg_setup.ShouldRun():
- args.host = True
+ setup_mkcert = True
# Install base packages if we haven't already.
host_base_setup = host_setup_runner.HostBasePkgInstaller()
if host_base_setup.ShouldRun():
args.host_base = True
- run_setup = args.force or args.gcp_init or args.host or args.host_base
+ run_setup = (args.force or args.gcp_init or args.host or args.host_base
+ or setup_mkcert)
if run_setup:
answer = utils.InteractWithQuestion("Missing necessary acloud setup, "
diff --git a/setup/setup.py b/setup/setup.py
index 9da65b5..2f0dc8a 100644
--- a/setup/setup.py
+++ b/setup/setup.py
@@ -63,8 +63,10 @@
task_queue.append(host_base_runner)
task_queue.append(host_avd_runner)
task_queue.append(host_cf_common_runner)
- task_queue.append(host_mkcert_runner)
task_queue.append(host_env_runner)
+ if args.autoconnect == constants.INS_KEY_WEBRTC:
+ task_queue.append(host_mkcert_runner)
+
# We should do these setup tasks if specified or if no args were used.
if args.host_base or (not args.host and not args.gcp_init):
task_queue.append(host_base_runner)