Commit Graph

206 Commits

Author SHA1 Message Date
Greg Neagle 39dcec0c44 Changes in updatecheck to better find installed items that have overlapping receipts with other items in the Munki repo. This specifically makes Munki better able to identify iLife'08 vs. iLife'09 vs. iLife'11, and therefore makes Munki actually capable of removing any of these, which was problematic before. 2012-04-27 10:28:32 -07:00
ogle 6c243e74a0 s/Retreiving/Retrieving/ in 'Retreiving catalog "%s" ...' MSU message.
i before e except after c
2012-03-27 22:08:55 +00:00
Greg Neagle 21079ca718 Skip /.MobileBackups directory when scanning for apps; make sure all Exceptions are converted to strings before sendning to display_error 2012-03-25 19:21:54 -07:00
Greg Neagle b0e713fdda Fix a call to lookForUpdatesForVersion() with the wrong number of parameters 2012-03-22 14:58:58 -07:00
Heig Gregorian b42bec7aef Improved print-out for 'Found' updates 2012-03-09 10:43:09 -08:00
Greg Neagle 866c31ecd6 Changes in how we look for updates that have a version number appended 2012-03-08 11:20:20 -08:00
Heig Gregorian 2fde9b96d7 Remove Conditions.plist once CONDITIONS has been populated and output CONDITIONS to ManagedInstallReport.plist 2012-03-05 11:12:55 -08:00
Heig Gregorian c6be815303 Removed changes to predicateEvaluatesAsTrue. Conditional scripts must now write output to ConditionalItems.plist which is then parsed to the CONDITIONS dict for inclusion into the INFO_OBJECT dict 2012-03-05 07:34:59 -08:00
Heig Gregorian afce440698 Initial commit for conditional items framework extension 2012-03-02 14:10:34 -08:00
Greg Neagle 0cf1ad4089 Minor tweak when processing updates for items already installed and manifest specifies a version 2012-03-01 17:04:18 -08:00
Greg Neagle f97b63a9bf Better processing of requires and update_for items when names have versions appended. 2012-02-29 13:42:43 -08:00
Justin McWilliams d20ea289d2 If an item is already in the cache, set download_speed to 0. Previously I just assumed this would always be the case, but I've seen download_installeritem() take 1-2 seconds on larger packages (presumably because of hashing?) 2012-02-16 11:28:39 -05:00
Greg Neagle 34ab750460 Changes to allow curl to follow redirects when retreiving an Apple sucatalog; this is needed to support Lion Server's Software Update service. 2012-02-14 16:51:34 -08:00
Greg Neagle 5489fb5dc3 updatecheck.py enoughDiskSpace() -- coerce all installed_size values to integers when calculating available disk space. Fix for broken pkginfo editing that saved installed_size as string instead of integer. 2012-02-14 09:41:08 -08:00
Justin McWilliams d8e4c6cb15 Ignore calculating download speeds for downloads under 1 MB so small files don't skew avg speeds, as *sustained* download speeds are more helpful. 2012-02-13 10:52:53 -05:00
Justin McWilliams 063dc935a5 plists cannot store NoneType, so store 0 for unknown download_kbytes_per_sec 2012-02-10 12:51:27 -05:00
Justin McWilliams 11e5818b75 updatecheck now calculates download speed (KB/s) and installer writes it to ManagedInstallReport.plist::InstallResults dictionaries. 2012-02-10 11:27:45 -05:00
Greg Neagle 856a943ff3 Fix for optional_installs managed_uninstalls -- bad intentation 2012-02-03 17:28:58 -08:00
Greg Neagle 638e869bc5 Merge branch 'master' into curl-refactor 2012-01-19 08:39:51 -08:00
Justin McWilliams 896bd9a80c If InstallInfo.plist is corrupt, delete it and move on instead of crashing indefinitely. 2012-01-18 14:34:59 -05:00
Greg Neagle ca03bb0325 Output tweaks; munkicommon.mountdmg() can now mount disk images containing End User License Agreements 2012-01-04 13:54:04 -08:00
Greg Neagle 7aa439d445 Change updatecheck.getMunkiResource() to updatecheck.getResourceIfChangedAtomically() so as not to break existing preflight scripts that might make use of updatecheck.getResourceIfChangedAtomically() 2011-12-22 15:36:13 -08:00
Greg Neagle 5651b2a9a4 appleupdates.py now sets User-Agent header; munki-specific cert and header stuff moved to updatecheck; tests updated 2011-12-22 14:01:27 -08:00
Greg Neagle 50833869db Conflict resolution 2011-12-22 09:30:49 -08:00
Justin McWilliams 6e9790c129 If a cached manifest is corrupt, delete it. 2011-12-22 11:27:15 -05:00
Greg Neagle 7160c4d176 Move a couple more functions from updatecheck.py to fetch.py 2011-12-21 15:02:36 -08:00
Greg Neagle 0c17cc4378 Complete refactor of fetch.py/updatecheck.py 2011-12-21 14:55:44 -08:00
Greg Neagle db86dceace Begin changes so updatecheck.py uses fetch.py 2011-12-21 14:35:36 -08:00
Greg Neagle c916885e03 Added munkicommon.display_status_major and renamed munkicommon.display_status to munkicommon.display_status_minor; changes to more closely map the munkistatus-style output to the stdout-style output 2011-12-21 11:28:52 -08:00
Greg Neagle f751579404 More tweaks to make quiet runs of managedsoftwareupdate quieter 2011-12-21 10:00:23 -08:00
Justin McWilliams 19b4a0bbc7 If Content-Length header is missing, look for a custom header named X-Download-Size. This is to allow servers that send chunked transfer encoding to specify download size, as Content-Length is prohibited for such transfers per RFC2616 section 4.4. An example of a server that sends downloads in such a way is App Engine Blobstore. So this change fixes the progress bar for Simian clients, as well as anyone else that may wish to use chunked transfer encoding for large downloads. 2011-12-15 10:40:03 -05:00
Justin McWilliams cb435998be Fix crash where self service manifest fails to be read from disk. 2011-12-15 10:26:22 -05:00
Greg Neagle fdad42a7e5 Add support for installer environment variables to pkginfo 2011-12-12 10:44:06 -08:00
Greg Neagle 7324c9da5c Minor tweaks and renames of predicate/comparison methods 2011-11-22 10:05:26 -08:00
Greg Neagle 9f1abe7bfa Add support for "conditional_items" key in manifests 2011-11-18 15:20:12 -08:00
Justin McWilliams 1930c76981 Don't crash if (minimum|maximum)_os_version pkginfo configs are present but empty, instead just assume there is no mix/max. 2011-11-09 12:12:42 -05:00
Greg Neagle a41af3b7f9 Revert "Beginning of refactor for getResource/curl methods"
This reverts commit 821e9072cc.
2011-09-29 16:39:57 -07:00
Greg Neagle 821e9072cc Beginning of refactor for getResource/curl methods 2011-09-29 16:24:23 -07:00
Greg Neagle d0ca63a43b Merge branch 'status-launch-and-cache-on-checksum' 2011-09-27 09:26:12 -07:00
Justin McWilliams 72dfa5bce0 s/Content-Type/Content-Length/ 2011-09-19 10:11:56 -04:00
Justin McWilliams 56216d1db3 Don't sleep for .1 seconds in between reading HTTP header lines. 2011-09-16 18:02:21 -04:00
Justin McWilliams 79cec41552 Fix CPU owning for curl downloads while on slow internet connections when Content-Length header is not present.
App Engine Blobstore does not send Content-Type, which means targetsize is always 0 and therefore the conditional that calculates and reports download progress is never entered, and the existing sleep location is never hit. On slow internet connections, this means that CPU spikes as proc.poll() is being called far more than curl is downloading.

Fix this by moving time.sleep(0.1) into the main curl while loop, where it'll execute on every loop iteration. That means we have a small sleep even while headers are downloading/etc, but that's not a big deal given it's a 1/10th of a second.
2011-09-15 18:39:49 -04:00
Rob Middleton 57b543de88 use getxattr function in all relevant places 2011-09-08 07:22:30 +10:00
Rob Middleton c903723dbd add brief logging + squash a wrong name 2011-09-07 23:18:52 +10:00
Rob Middleton ed27d180ed Do not redownload or check payload files with web server if hash of cached file matches hash in catalog. 2011-09-07 22:49:00 +10:00
Greg Neagle 98ac900592 Update discardTimeZoneFromDate() function in updatecheck.py to match that in MSU.app's munki.py. Fixes issue with Lion caused by differing string representations of NSDates between Lion and Snow Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@1294 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-16 02:11:15 +00:00
Justin McWilliams 8cd8e31a97 MACHINE['os_vers'] needs to be the full version, not just major/minor.
git-svn-id: http://munki.googlecode.com/svn/trunk@1288 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 19:35:20 +00:00
Justin McWilliams e3b3034c0e Use the new munkicommon.getOsVersion() across the board, especially one place that was previously shelling out to /usr/bin/sw_vers.
git-svn-id: http://munki.googlecode.com/svn/trunk@1287 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 19:31:51 +00:00
Greg Neagle be33a193e1 Change output of etag and range request warnings when downloading via HTTP so that these are not formal warnings, but rather informational-level messages that are logged and printed to stdout when run via the command line.
git-svn-id: http://munki.googlecode.com/svn/trunk@1281 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-10 16:37:54 +00:00
Justin McWilliams c6008abbc0 Apple Software Update fixes for environments where CatalogURL is already a file:// URL, not a http:// URL.
- s/getHTTPfileIfChangedAtomically/getResourceIfChangedAtomically/
- getFileIfChangedAtomically should urllib2.unquote paths, in case they came from the file:// URL.


git-svn-id: http://munki.googlecode.com/svn/trunk@1273 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-05 16:36:47 +00:00