Commit Graph

518 Commits

Author SHA1 Message Date
Greg Neagle
6e188c8cc7 Tweaks to better parse out the Software Update title, version and description from a wider variety of valid dist files.
git-svn-id: http://munki.googlecode.com/svn/trunk@1017 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-02-01 06:03:49 +00:00
Greg Neagle
69705bb33e Change version number handling to eliminate padding/truncating version numbers to five positions (ala 1.0.0.0.0).
git-svn-id: http://munki.googlecode.com/svn/trunk@1016 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-31 21:38:47 +00:00
Greg Neagle
7390b94f46 Minor change to notifyUserOfUpdates() in managedsoftwareupdate.
git-svn-id: http://munki.googlecode.com/svn/trunk@1013 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-27 23:01:34 +00:00
Greg Neagle
4fc6720ea5 Fix so a manifest that is missing a catalog list does not cause a TypeError exception in updatecheck.getAutoRemovalItems()
git-svn-id: http://munki.googlecode.com/svn/trunk@1011 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-25 22:49:26 +00:00
Greg Neagle
a853f78c9f Update copyright dates across the board.
git-svn-id: http://munki.googlecode.com/svn/trunk@1010 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-25 18:22:14 +00:00
Greg Neagle
e6dd9044c5 Fix to munkicommon.getAvailableDiskSpace() so long int doesn't get written to ManagedInstallsReport.plist, which results in an invalid plist as far as MunkiReport is concerned.
git-svn-id: http://munki.googlecode.com/svn/trunk@1009 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-24 23:34:30 +00:00
Greg Neagle
a5e3180f44 Changes to what gets recorded in ManagedInstallsReport.plist to work nicer with MunkiReport.
git-svn-id: http://munki.googlecode.com/svn/trunk@1008 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-24 23:15:14 +00:00
Greg Neagle
d50ec66c31 Minor cleanups.
git-svn-id: http://munki.googlecode.com/svn/trunk@1004 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-18 23:27:48 +00:00
Greg Neagle
8b54baa1c0 munkicommon: change to Spotlight search so we can bail if the search takes too long.
appleupdates: replace os.path.relpath() with something that also works under Leopard.

git-svn-id: http://munki.googlecode.com/svn/trunk@1003 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-18 20:10:27 +00:00
Greg Neagle
7384ca44f5 Changes in getSoftwareUpdateInfo() and processSoftwareUpdateDownload() to properly parse Apple Software Updates under Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@1002 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-17 21:31:35 +00:00
Greg Neagle
45dd5f4d75 Fixed undefined "item" that should have been "install_item"
git-svn-id: http://munki.googlecode.com/svn/trunk@999 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-15 01:03:32 +00:00
Greg Neagle
c2534d5cc8 Replaced instance of "os.listdir" with "munkicommon.listdir" in appleupdates.processSoftwareUpdateDownload()
git-svn-id: http://munki.googlecode.com/svn/trunk@998 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-14 23:45:57 +00:00
Greg Neagle
abe3d2a1de appleupdates.py now creates its own .dist files to manage installation of downloaded Apple Software Updates, replacing the earlier technique of just installing the individual packages in filename order.
In most invocations of subprocess.Popen, change the bufsize from 1 to -1, which changes from line-buffered to "big" buffers.

Other minor changes to align with the appleupdates,py changes and some pylint-recommended cleanup.

git-svn-id: http://munki.googlecode.com/svn/trunk@995 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-14 19:11:05 +00:00
Greg Neagle
739df8dcd8 Defensive coding around munkicommon.display_error and munkicommon.display_warning to avoid a KeyError if munkicommon.report is missing the Errors or Warnings keys.
Similar defensive coding in installer.py for the InstallResults and RemovalResults keys.

Safer report initialization in managedsoftwareupdate.



git-svn-id: http://munki.googlecode.com/svn/trunk@993 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-01-04 19:33:25 +00:00
Greg Neagle
769e8dab91 Reworked reports to show more relevant data on ManagedInstalls. install-only munki sessions also carry over data from the previous run so the report is more complete.
git-svn-id: http://munki.googlecode.com/svn/trunk@980 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-15 21:34:25 +00:00
Justin McWilliams
f098fb9d1d Typo fix: s/Perfoming/Performing/ in preflight task MSU notification.
git-svn-id: http://munki.googlecode.com/svn/trunk@978 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-15 18:13:56 +00:00
Greg Neagle
23928a4e7e Add back munkicommon.MANAGED_INSTALLS_PLIST_PATH and munkicommon.SECURE_MANAGED_INSTALLS_PLIST_PATH for use by preflight and postflight scripts.
git-svn-id: http://munki.googlecode.com/svn/trunk@974 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-13 23:05:37 +00:00
Greg Neagle
681acae624 Add MCX support, based on code contribution from Dan Roque.
Other minor clean-ups.

git-svn-id: http://munki.googlecode.com/svn/trunk@973 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-13 20:11:22 +00:00
Rob Middleton
f87284d4d4 Remove tmpdir at expected exits of managedsoftwareupdate. tmpdir is created by global line in munkicommon: "tmpdir = tempfile.mkdtemp()". More fiddly to make the change so tmpdir only created where there is demand for it.
git-svn-id: http://munki.googlecode.com/svn/trunk@972 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-12 09:11:22 +00:00
Rob Middleton
e2ef24363d itemindex needs to always be in sync with the for installlist loop to allow foundagain / deletion logic to work in forced installs
git-svn-id: http://munki.googlecode.com/svn/trunk@971 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-12 01:20:57 +00:00
Justin McWilliams
edd0eee5dd munkicommon:
Replace getAvailableDiskSpace() method shelling out to diskutil with more reliable and faster Python os.statvfs() call. Credit John Randolph.


git-svn-id: http://munki.googlecode.com/svn/trunk@969 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-10 16:44:14 +00:00
Greg Neagle
a0820fe027 Added more logging/debug logging to experimental "softwareupdatename" support for pkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@967 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-10 00:10:10 +00:00
Greg Neagle
26bc156996 Exit if makepkginfo returns empty pkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@952 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-08 18:47:45 +00:00
Greg Neagle
4142e8fab8 Fix for updatecheck.getAutoRemovalItems() to properly exclude items in a managed_installs list that are specified with version as well as name.
git-svn-id: http://munki.googlecode.com/svn/trunk@951 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-06 18:46:46 +00:00
Greg Neagle
344baea859 Fix logic when checking to see if an item in a managed_uninstalls list has already been processed as a managed_install.
git-svn-id: http://munki.googlecode.com/svn/trunk@950 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-06 18:41:14 +00:00
Greg Neagle
503cdf7ec5 Added support for 'softwareupdatename' in pkginfo
git-svn-id: http://munki.googlecode.com/svn/trunk@949 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-03 22:19:05 +00:00
Greg Neagle
50fbf2d2e8 Change how we track what we've processed so items that are in both managed_updates and optional_installs are not listed twice when there is an update available. Addresses munki issue 51.
git-svn-id: http://munki.googlecode.com/svn/trunk@948 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-02 22:39:25 +00:00
Greg Neagle
35d8757faf munkiimport now searches the repo for pkg/installer_items that match the one currently being imported to allow you to make a new version of a package consistent with a previous version.
git-svn-id: http://munki.googlecode.com/svn/trunk@947 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-01 21:04:28 +00:00
John Randolph
5c4e7ca51b tweaks to handle objc.pyobc_unicode (NSString) correctly
git-svn-id: http://munki.googlecode.com/svn/trunk@946 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-01 20:33:15 +00:00
John Randolph
3d8d960bb1 simplify listdir() function to use Python's os.listdir() with unicode
path behavior to do the work for us



git-svn-id: http://munki.googlecode.com/svn/trunk@945 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-01 16:20:06 +00:00
Rob Middleton
098d450c67 fix to r912: installer.installWithInfo got an extra return parameter. The call to it from within appleupdates.installAppleUpdates needed changing to be consistent. Without that change restartneeded was being read as true in all cases.
git-svn-id: http://munki.googlecode.com/svn/trunk@944 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-12-01 04:48:08 +00:00
Justin McWilliams
46bbc2d596 Encode ClientIdentifier in UTF-8 before attempting to urllib2.quote() it, to support unicode characters in client id.
git-svn-id: http://munki.googlecode.com/svn/trunk@942 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-30 18:22:10 +00:00
John Randolph
ffe6722d87 wrap os.listdir() to decode utf-8 unicode into unicode objects
change all code locations using os.listdir() to use munkicommon.listdir()



git-svn-id: http://munki.googlecode.com/svn/trunk@941 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-30 16:28:45 +00:00
Greg Neagle
7ab92fa3cc Changes to simplify processing logic and allow items that are in both managed_updates and optional_installs to be removed by the user.
git-svn-id: http://munki.googlecode.com/svn/trunk@933 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-29 21:33:03 +00:00
Greg Neagle
1136569854 Simplify the logic in appleSoftwareUpdatesAvailable() when suppresscheck is True.
git-svn-id: http://munki.googlecode.com/svn/trunk@932 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-29 18:23:35 +00:00
Rob Middleton
6ee6a33e96 pylint: bug in munkicommon.format_time, indentation fixes
git-svn-id: http://munki.googlecode.com/svn/trunk@931 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-27 10:10:27 +00:00
Rob Middleton
e55faec0aa fix to r924: on suppresscheck still need to consider whether cached apple updates are available.
git-svn-id: http://munki.googlecode.com/svn/trunk@930 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-27 05:54:57 +00:00
Rob Middleton
1ff5d190fa applesoftwareupdatesonly is not global / not in this scope
git-svn-id: http://munki.googlecode.com/svn/trunk@929 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-26 08:52:00 +00:00
Rob Middleton
32b7e37066 Fix to functionality added in r818. On GUI auto run, do forced installs, then prompt user if either munki updates still availalbe, or any apple updates available.
git-svn-id: http://munki.googlecode.com/svn/trunk@928 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-25 02:03:29 +00:00
Greg Neagle
ece16bfac6 Make sure uninstall script is removed regardless of success or failure.
git-svn-id: http://munki.googlecode.com/svn/trunk@927 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-23 19:21:11 +00:00
Greg Neagle
337bb70150 More changes to Apple Software Update logic: if /Library/Updates/index.plist exists, we check values from /Library/Preferences/com.apple.SoftwareUpdate.plist -- LastResultCode and LastSuccessfulDate --to attempt to determine if index.plist is still valid, or if it may be stale.
git-svn-id: http://munki.googlecode.com/svn/trunk@926 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-23 18:38:33 +00:00
Greg Neagle
f790b71aea Add support for uninstall scripts embedded into pkginfo.
git-svn-id: http://munki.googlecode.com/svn/trunk@925 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-22 20:00:15 +00:00
Greg Neagle
a77c1329fb Simplified check for available Apple Software Updates to avoid presenting stale info to user.
git-svn-id: http://munki.googlecode.com/svn/trunk@924 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-22 18:13:04 +00:00
Greg Neagle
f575542905 Make sure we return false if user clicks the stop button while building the package database under Snow Leopard
git-svn-id: http://munki.googlecode.com/svn/trunk@923 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-21 00:32:12 +00:00
Greg Neagle
5be8b5ed84 If running a preflight script, call munkicommon.display_status so we tickle the munkistatus socket before it times out.
git-svn-id: http://munki.googlecode.com/svn/trunk@922 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-18 22:25:00 +00:00
Justin McWilliams
e190a2e9d5 Make all munkicommon.display_* methods accept a message and optional arguments
to concatenate to the message (using Python concat ala logging.* methods); drop unicode chars.

Fix problem (line 338 of updatecheck.py) where attempting to string-concat
unicode characters before sending to munkicommon.display_debug1() causes
UnicodeDecodeError.



git-svn-id: http://munki.googlecode.com/svn/trunk@921 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-18 21:03:01 +00:00
Greg Neagle
01bbf73ef2 Typo fix in updatecheck.py;
munkicommon - in display_warning and display_error, make sure it is a string that is appended to report['Warnings'] or report['Errors']

git-svn-id: http://munki.googlecode.com/svn/trunk@919 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-18 16:38:44 +00:00
Greg Neagle
3a18a9fd9e installer.py: account for case where no valid installer item is found on a disk image
updatecheck.py: provide more feedback when pkg items are rejected due to incompatible os or architecture.

git-svn-id: http://munki.googlecode.com/svn/trunk@918 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-17 21:57:21 +00:00
Greg Neagle
a7cc6e5457 Alter debug output when comparing OS version and architecture.
git-svn-id: http://munki.googlecode.com/svn/trunk@915 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-15 18:40:16 +00:00
Greg Neagle
149715226a installs/removals that are skipped during forced_* operations are rewritten to InstallInfo.plist so they can be done with user approval. installer items in /Library/Managed Installs/Cache/ are not removed if needed by skipped installs.
git-svn-id: http://munki.googlecode.com/svn/trunk@912 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-11-12 19:20:04 +00:00