Greg Neagle
03a6136ea0
Change appleupdates.py to use fetch.py for downloads
2011-12-21 16:36:52 -08: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
b6436114cd
Merge munkicommon.display_status_* changes from branch master; include fetch.py
2011-12-21 11:33:50 -08:00
Greg Neagle
62ed24ef31
Merge branch 'master' into curl-refactor
2011-12-21 11:30:51 -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
2fc08a0f49
Merge use of x-download-size header into fetch.py:curl
2011-12-21 10:11:46 -08:00
Greg Neagle
cf31542514
Merge branch 'master' into curl-refactor
2011-12-21 10:04:27 -08:00
Greg Neagle
f751579404
More tweaks to make quiet runs of managedsoftwareupdate quieter
2011-12-21 10:00:23 -08:00
Greg Neagle
820a231e78
munkicommon.display_warning and munkicommon.display_error now only write to log if munkicommon.verbose < 1
2011-12-21 08:39:30 -08:00
Greg Neagle
2959be501f
munkicommon.display_warning and munkicommon.display_error now only write to log if munkicommon.verbose < 1
2011-12-21 08:17:49 -08:00
Greg Neagle
2f61c263f4
Merge branch 'master' into curl-refactor
2011-12-20 14:26:27 -08:00
Greg Neagle
96ec095997
Merge branch 'master' into curl-refactor
2011-12-20 14:23:20 -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
2be63ee00a
Don't display on battery power warning unless charge is less than 50%. Reverse buttons in warning dialog to match those in Apple Software Update.
2011-12-07 14:00:38 -08:00
Greg Neagle
69419d939b
MSU.app now displays a warning if user chooses to update while on battery power.
2011-12-06 14:29:53 -08:00
Greg Neagle
736f722276
MSU: warn user if on battery power when choosing to update
2011-12-06 14:00:08 -08:00
Greg Neagle
ac9141125d
Add getPowerInfo() to munki.py for use by MSU.app
2011-12-05 11:16:12 -08:00
Greg Neagle
c01eb685a9
Spacing fix in managedsoftwareupdate; try/except in manifestutil so a bad manifest doesn't cause an unhandled exception.
2011-12-05 09:45:59 -08:00
Greg Neagle
1497c2c42b
Merge branch 'master' into conditional-includes
2011-12-05 09:43:59 -08:00
Justin McWilliams
dd2578dd61
Catch OSError on munkistatus.getPIDforProcessName() and return 0 to avoid Munki crashes as seen below:
...
Dec 01 14:11:20 Mounting disk image Office2011-1413UpdateEN.dmg
Dec 01 14:11:23 ERROR: Unexpected error in munkilib.installer:
Dec 01 14:11:23 ERROR: Traceback (most recent call last):
File "/usr/local/munki/managedsoftwareupdate", line 216, in doInstallTasks
need_to_restart = installer.run(only_unattended=only_unattended)
File "/usr/local/munki/munkilib/installer.py", line 1190, in run
only_unattended=only_unattended)
File "/usr/local/munki/munkilib/installer.py", line 681, in installWithInfo
suppressBundleRelocation)
File "/usr/local/munki/munkilib/installer.py", line 265, in installall
suppressBundleRelocation)
File "/usr/local/munki/munkilib/installer.py", line 113, in install
munkistatus.percent(0)
File "/usr/local/munki/munkilib/munkistatus.py", line 190, in percent
sendCommand(u"PERCENT: %s\n" % percentage)
File "/usr/local/munki/munkilib/munkistatus.py", line 71, in sendCommand
launchAndConnectToMunkiStatus()
File "/usr/local/munki/munkilib/munkistatus.py", line 53, in launchAndConnectToMunkiStatus
if not getMunkiStatusPID():
File "/usr/local/munki/munkilib/munkistatus.py", line 131, in getMunkiStatusPID
"Managed Software Update.app/Contents/MacOS/Managed Software Update") \
File "/usr/local/munki/munkilib/munkistatus.py", line 109, in getPIDforProcessName
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1026, in _execute_child
self.pid = os.fork()
OSError: [Errno 35] Resource temporarily unavailable
2011-12-02 12:15:50 -05:00
Greg Neagle
8522e3ebfc
Merge branch 'master' into curl-refactor
2011-11-22 10:20:33 -08:00
Greg Neagle
e7a55f662e
Merge branch 'master' into conditional-includes
2011-11-22 10:19:48 -08:00
Greg Neagle
e7b2667874
Fix for issue 131: Installs items with subdirectories in source_item not handled correctly by removeCopiedItems
2011-11-22 10:12:35 -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
Greg Neagle
874fe82ce3
Merging all changes in master back to curl-refactor branch
2011-11-17 19:38:29 -08:00
Greg Neagle
bb7f2c8e69
Merge branch 'master' of https://code.google.com/p/munki
2011-11-17 19:29:48 -08:00
Justin McWilliams
571a6a3f38
Don't log repetitive lines when running softwareupdate; only log if the stdout
...
has changed since the last loop iteration.
This should change things like:
Nov 16 13:12:03 Registering updated applications…
...
Nov 16 13:12:19 Registering updated applications…
Nov 16 13:12:19 Registering updated applications…
Nov 16 13:12:20 Registering updated applications…
Nov 16 13:12:20 Registering updated applications…
Nov 16 13:12:21 Registering updated applications…
Nov 16 13:12:21 Registering updated applications…
Nov 16 13:12:22 Registering updated applications…
Nov 16 13:12:22 Writing package receipts…
Nov 16 13:12:23 Writing package receipts…
Nov 16 13:12:23 Writing package receipts…
Nov 16 13:12:24 Writing package receipts…
Nov 16 13:12:24 Writing package receipts…
Nov 16 13:12:25 Writing package receipts…
Nov 16 13:12:25 Writing package receipts…
...
Nov 16 13:12:59 Writing package receipts…
To simply:
Nov 16 13:12:03 Registering updated applications…
Nov 16 13:12:22 Writing package receipts…
2011-11-17 14:34:34 -05:00
Justin McWilliams
95f162e750
Don't log repetitive lines when running softwareupdate; only log if the stdout has changed since the last loop iteration.
...
This should change things like:
Nov 16 13:12:03 Registering updated applications…
...
Nov 16 13:12:19 Registering updated applications…
Nov 16 13:12:19 Registering updated applications…
Nov 16 13:12:20 Registering updated applications…
Nov 16 13:12:20 Registering updated applications…
Nov 16 13:12:21 Registering updated applications…
Nov 16 13:12:21 Registering updated applications…
Nov 16 13:12:22 Registering updated applications…
Nov 16 13:12:22 Writing package receipts…
Nov 16 13:12:23 Writing package receipts…
Nov 16 13:12:23 Writing package receipts…
Nov 16 13:12:24 Writing package receipts…
Nov 16 13:12:24 Writing package receipts…
Nov 16 13:12:25 Writing package receipts…
Nov 16 13:12:25 Writing package receipts…
...
Nov 16 13:12:59 Writing package receipts…
To simply:
Nov 16 13:12:03 Registering updated applications…
Nov 16 13:12:22 Writing package receipts…
2011-11-17 14:30:55 -05:00
Justin McWilliams
19fbb4ed56
Case-insensitive sort MSU GUI update list, preferring forced install items, then preferring display_name to name.
2011-11-17 12:50:16 -05:00
Greg Neagle
8fc6025a1f
Bumped version in version.plist to 0.8.1 so that future builds have correct version info.
2011-11-11 09:43:58 -08:00
Greg Neagle
7ea5ed9dac
When installing packages, set restartflag to True if pkginfo declares a restart is needed, even if the package itself does not.
2011-11-11 09:40:06 -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
Justin McWilliams
06801d2ef7
Reduce the likihood of a lingering /var/run/com.googlecode.munki.ManagedSoftwareUpdate by sleeping for 1/2 a second (instead of .1) and using open() instead of subprocess+touch to write the file.
2011-11-08 12:42:41 -05:00
Greg Neagle
8bd3bd327f
Merge branch 'master' of https://code.google.com/p/munki
2011-11-01 10:16:18 -07:00
Greg Neagle
25c87bdddf
Fix for makepkginfo for really old package formats with missing version info.
2011-11-01 10:16:10 -07:00
Justin McWilliams
e5af29757b
Encode objc.pyobjc_unicode error messages in FoundationPlist to ascii, stripping all unicode characters, to avoid explosions.
2011-10-28 14:37:38 -04:00
Greg Neagle
6c86d2ecdc
More work on fetch.py?
2011-10-27 08:39:53 -07:00
John Randolph
288dbc880a
patch for when Apple APIs return None instead of str objects
2011-10-21 15:09:53 -04:00
Justin McWilliams
c803e1ba89
Remove printing preflight stderr, as it's been moved to runScript.
2011-10-17 18:48:15 -04:00
Justin McWilliams
c938311b2c
Move "Starting managedsoftwareupdate run" to before executing preflight,
...
"Ending ..." to after executing postflight, and add the runtype to the starting
msg so it's clear who/what is executing Munki and for what reason.
2011-10-14 16:19:38 -04: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
d6ae15245c
Add USER to environment variables before running /usr/sbin/installer. This works around an issue in some installer scripts that use the gneagle environment variable.
2011-09-28 09:45:02 -07:00
Greg Neagle
d0ca63a43b
Merge branch 'status-launch-and-cache-on-checksum'
2011-09-27 09:26:12 -07:00
Greg Neagle
ff43952683
Added tar2pkg.py to tools
2011-09-27 09:26:00 -07:00