Merge pull request #42 from shinjukumiku/shinjukumiku-patch-cmbuild

installmacos.py: install_product: set CM_BUILD
This commit is contained in:
Greg Neagle 2020-01-31 08:11:43 -08:00 committed by GitHub
commit e3d870a070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,6 +208,9 @@ def unmountdmg(mountpoint):
def install_product(dist_path, target_vol): def install_product(dist_path, target_vol):
'''Install a product to a target volume. '''Install a product to a target volume.
Returns a boolean to indicate success or failure.''' Returns a boolean to indicate success or failure.'''
# set CM_BUILD env var to make Installer bypass eligibilty checks
# when installing packages (for machine-specific OS builds)
os.environ["CM_BUILD"] = "CM_BUILD"
cmd = ['/usr/sbin/installer', '-pkg', dist_path, '-target', target_vol] cmd = ['/usr/sbin/installer', '-pkg', dist_path, '-target', target_vol]
try: try:
subprocess.check_call(cmd) subprocess.check_call(cmd)