Fixes for new preinstall_script and postinstall_script functionality.

git-svn-id: http://munki.googlecode.com/svn/trunk@1059 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2011-03-08 22:10:08 +00:00
parent e9a7080191
commit 35282d5115
3 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -482,7 +482,7 @@ def installWithInfo(dirpath, installlist, only_forced=False, applesus=False):
retcode = 0
if 'preinstall_script' in item:
retcode = runEmbeddedScript('preinstall_script', item['name'])
retcode = runEmbeddedScript('preinstall_script', item)
if retcode == 0 and 'installer_item' in item:
display_name = item.get('display_name') or item.get('name')
@@ -599,7 +599,7 @@ def installWithInfo(dirpath, installlist, only_forced=False, applesus=False):
if retcode == 0 and 'postinstall_script' in item:
# only run embedded postinstall script if we still have a
retcode = runEmbeddedScript(
'postinstall_script', item['name'])
'postinstall_script', item)
if retcode:
# we won't consider postinstall script failures as fatal
# since the item has been installed via package/disk image
+1
View File
@@ -1065,6 +1065,7 @@ def main():
'''Used when calling removepackages.py directly from the command line.'''
# command-line options
p = optparse.OptionParser()
p.set_usage('''Usage: %prog [options] package_id ...''')
p.add_option('--forcedeletebundles', '-f', action='store_true',
help='Delete bundles even if they aren\'t empty.')
p.add_option('--listfiles', '-l', action='store_true',
+2
View File
@@ -1520,6 +1520,8 @@ def processInstall(manifestitem, cataloglist, installinfo):
'package_path',
'blocking_applications',
'installs',
'preinstall_script',
'postinstall_script',
'items_to_copy', # used w/ copy_from_dmg
'copy_local'] # used w/ AdobeCS5 Updaters