mirror of
https://github.com/munki/munki.git
synced 2026-05-01 09:49:31 -05:00
Fix looping issue when updating an existing optional install. Fixes issue 282
This commit is contained in:
@@ -670,7 +670,7 @@ class MSUMainWindowController(NSWindowController):
|
||||
# do we need to add a new node to the other list?
|
||||
if item.get('needs_update'):
|
||||
# make some new HTML for the updated item
|
||||
managed_update_names = munki.getInstallInfo().get('managed_updates', [])
|
||||
managed_update_names = MunkiItems.getInstallInfo().get('managed_updates', [])
|
||||
item_template = msulib.get_template('update_row_template.html')
|
||||
item_html = item_template.safe_substitute(item)
|
||||
|
||||
|
||||
@@ -167,9 +167,12 @@ def getEffectiveUpdateList():
|
||||
def allOptionalChoicesProcessed():
|
||||
# get processed optional installs and removals
|
||||
install_info = getInstallInfo()
|
||||
managed_installs_names = [item['name']
|
||||
for item in install_info.get('managed_installs', [])]
|
||||
processed_optional_items = install_info.get('optional_installs')
|
||||
processed_install_names = [item['name'] for item in processed_optional_items
|
||||
if item.get('will_be_installed')]
|
||||
if item.get('will_be_installed')
|
||||
or item['name'] in managed_installs_names]
|
||||
#NSLog('processed_install_names: %s' % processed_install_names)
|
||||
processed_removal_names = [item['name'] for item in processed_optional_items
|
||||
if item.get('will_be_removed')]
|
||||
@@ -464,6 +467,9 @@ class GenericItem(dict):
|
||||
'removing':
|
||||
NSLocalizedString(u'Removing',
|
||||
u'RemovingLongActionText').encode('utf-8'),
|
||||
'update-available':
|
||||
NSLocalizedString(u'Update',
|
||||
u'UpdateLongActionText').encode('utf-8'),
|
||||
'update-will-be-installed':
|
||||
NSLocalizedString(u'Remove',
|
||||
u'RemoveLongActionText').encode('utf-8'),
|
||||
|
||||
@@ -125,7 +125,7 @@ def convertIconToPNG(app_name, destination_path, desired_size):
|
||||
closest to (but >= than if possible) the desired_size. Returns True if
|
||||
successful, False otherwise'''
|
||||
app_path = os.path.join('/Applications', app_name + '.app')
|
||||
if not os .path.exists(app_path):
|
||||
if not os.path.exists(app_path):
|
||||
return False
|
||||
try:
|
||||
info = FoundationPlist.readPlist(os.path.join(app_path, 'Contents/Info.plist'))
|
||||
|
||||
Reference in New Issue
Block a user