Bug 1680630: Generate android mozconfig without pkg manager r=nalexander

Knowing whether `brew` or `macports` is available isn't necessary
to generate the android mozconfig.
This should fix the generation of android mozconfig when a package
manager isn't available.

Depends on D99482

Differential Revision: https://phabricator.services.mozilla.com/D99496
This commit is contained in:
Mitchell Hentges 2020-12-11 19:08:02 +00:00
parent eafc0381ea
commit 85956749dc

View File

@ -230,14 +230,14 @@ class OSXBootstrapper(BaseBootstrapper):
)
def generate_mobile_android_mozconfig(self):
return getattr(
self, "generate_%s_mobile_android_mozconfig" % self.package_manager
)()
return self._generate_mobile_android_mozconfig()
def generate_mobile_android_artifact_mode_mozconfig(self):
return getattr(
self, "generate_%s_mobile_android_mozconfig" % self.package_manager
)(artifact_mode=True)
return self._generate_mobile_android_mozconfig(artifact_mode=True)
def _generate_mobile_android_mozconfig(self, artifact_mode=False):
from mozboot import android
return android.generate_mozconfig("macosx", artifact_mode=artifact_mode)
def ensure_xcode(self):
if self.os_version < StrictVersion("10.7"):
@ -426,11 +426,6 @@ class OSXBootstrapper(BaseBootstrapper):
"macosx", artifact_mode=artifact_mode, no_interactive=self.no_interactive
)
def generate_homebrew_mobile_android_mozconfig(self, artifact_mode=False):
from mozboot import android
return android.generate_mozconfig("macosx", artifact_mode=artifact_mode)
def _ensure_macports_packages(self, packages):
self.port = which("port")
assert self.port is not None
@ -503,11 +498,6 @@ class OSXBootstrapper(BaseBootstrapper):
"macosx", artifact_mode=artifact_mode, no_interactive=self.no_interactive
)
def generate_macports_mobile_android_mozconfig(self, artifact_mode=False):
from mozboot import android
return android.generate_mozconfig("macosx", artifact_mode=artifact_mode)
def ensure_package_manager(self):
"""
Search package mgr in sys.path, if none is found, prompt the user to install one.