MSC.app: revert to Munki2 behavior when generating a list of pending installs for the Updates view -- allows optional items to be removed from the pending update list

This commit is contained in:
Greg Neagle
2017-06-14 14:19:03 -07:00
parent 0252e091d1
commit e660011530

View File

@@ -189,9 +189,18 @@ def updatesContainNonUserSelectedItems():
def getEffectiveUpdateList():
'''Combine the updates Munki has found with any optional choices to
make the effective list of updates'''
# this was more complex in the past, but caused some edge case issues
# so we're going to simplify
return getUpdateList()
# get pending optional items seperately since OptionalItems have
# extra details/attribbutes
optional_installs = getOptionalWillBeInstalledItems()
optional_removals = getOptionalWillBeRemovedItems()
optional_item_names = [item['name']
for item in optional_installs + optional_removals]
# filter out pending optional items from the list of all pending updates
# so we can add in the items with additional optional detail
mandatory_updates = [item for item in getUpdateList()
if item['name'] not in optional_item_names]
return mandatory_updates + optional_installs + optional_removals
def getMyItemsList():