mirror of
https://github.com/munki/munki.git
synced 2026-03-13 13:08:44 -05:00
When skipping Apple Software updates because there is an update from Apple in InstallInfo.plist, remove AppleUpdates.plist to prevent MSU.app and logouthelper from presenting force_install_after_date warnings for items it will not be able to install because Munki updates are blocking Apple updates.
This commit is contained in:
@@ -692,6 +692,18 @@ def main():
|
||||
# shouldn't run Software Update if we're doing Apple items
|
||||
# with Munki items
|
||||
should_do_apple_updates = False
|
||||
# if there are force_install_after_date items in a pre-existing
|
||||
# AppleUpdates.plist this means we are blocking those updates.
|
||||
# we need to delete AppleUpdates.plist so that other code doesn't
|
||||
# mistakenly alert for forced installs it isn't actually going to
|
||||
# install.
|
||||
appleupdates_plist = os.path.join(
|
||||
munkicommon.pref('ManagedInstallDir'), 'AppleUpdates.plist')
|
||||
try:
|
||||
os.unlink(appleupdates_plist)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
else:
|
||||
# check the normal preferences
|
||||
should_do_apple_updates = munkicommon.pref(
|
||||
@@ -812,7 +824,8 @@ def main():
|
||||
appleupdates.appleSoftwareUpdatesAvailable(
|
||||
suppresscheck=True, client_id=options.id)
|
||||
except:
|
||||
munkicommon.display_error('Unexpected error in appleupdates:')
|
||||
munkicommon.display_error(
|
||||
'Unexpected error in appleupdates:')
|
||||
munkicommon.log(traceback.format_exc())
|
||||
munkicommon.savereport()
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user