mirror of
https://github.com/munki/munki.git
synced 2026-04-23 13:29:26 -05:00
processRemoval() now adds any updates to be removed to the list before it adds the main item.
git-svn-id: http://munki.googlecode.com/svn/trunk@306 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -40,7 +40,7 @@ import FoundationPlist
|
||||
|
||||
def get_version():
|
||||
'''Returns version of munkitools'''
|
||||
return "0.4.5"
|
||||
return "0.4.6"
|
||||
|
||||
|
||||
# output and logging functions
|
||||
|
||||
@@ -1342,17 +1342,20 @@ def processRemoval(manifestitem, cataloglist, installinfo):
|
||||
if uninstall_item.get('installs',None):
|
||||
iteminfo['remove_app_info'] = uninstall_item['installs'][0]
|
||||
|
||||
# before we add this removal to the list, check for installed updates and add them to the
|
||||
# removal list as well:
|
||||
update_list = lookForUpdates(iteminfo["name"], cataloglist, installinfo)
|
||||
for update_item in update_list:
|
||||
# call us recursively...
|
||||
is_or_will_be_removed = processRemoval(update_item,cataloglist,installinfo)
|
||||
|
||||
# finish recording info for this removal
|
||||
iteminfo["installed"] = True
|
||||
iteminfo["installed_version"] = uninstall_item.get('version')
|
||||
if 'RestartAction' in uninstall_item:
|
||||
iteminfo['RestartAction'] = uninstall_item['RestartAction']
|
||||
installinfo['removals'].append(iteminfo)
|
||||
munkicommon.display_detail("Removal of %s added to ManagedInstaller tasks." % manifestitemname_withversion)
|
||||
# now look to see if there are any updates for this item that should also be removed
|
||||
update_list = lookForUpdates(iteminfo["name"], cataloglist, installinfo)
|
||||
for update_item in update_list:
|
||||
# call us recursively...
|
||||
is_or_will_be_removed = processRemoval(update_item,cataloglist,installinfo)
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user