changes to allow users to add a optional_installs stage_os_installer item even if the installer is already staged or otherwise available in /Applications

This commit is contained in:
Greg Neagle
2022-09-12 09:17:41 -07:00
parent a43bf0ee81
commit efecd466cc
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -209,7 +209,13 @@ def process_optional_install(manifestitem, cataloglist, installinfo):
# therefore we would not be here!)
#
# TL;DR: only check installed_state if no installcheck_script
needs_update = installationstate.installed_state(item_pl) == 0
installation_state = installationstate.installed_state(item_pl)
if item_pl.get('installer_type') == 'stage_os_installer':
# 1 means installer is staged, but not _installed_
needs_update = installation_state != 2
else:
needs_update = installation_state == 0
if (not needs_update and
prefs.pref('ShowOptionalInstallsForHigherOSVersions')):
@@ -210,7 +210,7 @@ def some_version_installed(item_pl):
# that an install is not needed. We hope it's the latter.
return True
if item_pl.get('installer_type') == 'startosinstall':
if item_pl.get('installer_type') in ['startosinstall', 'stage_os_installer']:
# Some version of macOS is always installed!
return True