mirror of
https://github.com/munki/munki.git
synced 2026-05-03 02:40:32 -05:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user