Added function to clear Apple Update info.

git-svn-id: http://munki.googlecode.com/svn/trunk@374 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-19 03:23:36 +00:00
parent c1ea0d202d
commit 47cbc58a26
+13 -1
View File
@@ -479,6 +479,17 @@ def OLDinstallAppleUpdates():
return False
def clearAppleUpdateInfo():
'''Clears Apple update info. Called after performing munki updates
because the Apple updates may no longer be relevant.'''
updatesindexfile = '/Library/Updates/index.plist'
try:
os.unlink(updatesindexfile)
os.unlink(appleUpdatesFile)
except (OSError, IOError):
pass
def installAppleUpdates():
'''Uses /usr/sbin/installer to install updates previously
downloaded. Some items downloaded by SoftwareUpdate are not
@@ -527,7 +538,8 @@ def installAppleUpdates():
# define this here so we can access it in multiple functions
appleUpdatesFile = os.path.join(munkicommon.pref('ManagedInstallDir'),'AppleUpdates.plist')
appleUpdatesFile = os.path.join(munkicommon.pref('ManagedInstallDir'),
'AppleUpdates.plist')
def main():