Greg Neagle
ca3e0a2f06
Fixed typo in code added to shouldRebuildDB() to look at new receipts location in Snow Leopard.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@200 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-31 21:26:48 +00:00
Greg Neagle
87c5cf446d
Missed a few name changes when moving from pkgdata['pkg_refcount'] to pkgdata['pkg_references'].
...
git-svn-id: http://munki.googlecode.com/svn/trunk@199 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-31 20:30:23 +00:00
Greg Neagle
6752545fd6
Refactored processInstall() and download_installeritem() so that quoted URLs are maintained separately from file system paths - i.e., an installer item named "Hello World.dmg" would be downloaded as "Hello Wolrd.dmg" and not "Hello%20World.dmg".
...
git-svn-id: http://munki.googlecode.com/svn/trunk@198 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-31 17:34:00 +00:00
Greg Neagle
c6ff01072a
Added try/except block in clearLastNotifiedDate because FoundationPlist.readPlist raises an Exception when the plist is missing.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@196 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-28 18:21:13 +00:00
Greg Neagle
64edbdd6ae
Added warning message (which will normally go only to the log) when removing non-empty bundles.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@195 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-28 18:19:18 +00:00
Greg Neagle
6ca682ec52
Added debug info to removal processing where packages to be removed are being selected.
...
Added urllib2.quote() to several of the HTTP download requests to correctly process installer items, catalogs, and manifests that have URL-reserved characters (like spaces!)
git-svn-id: http://munki.googlecode.com/svn/trunk@194 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-28 18:18:14 +00:00
Greg Neagle
b56d53bc94
Post 10.5.X fix: munkicommon.pythonScriptRunning() now correctly determines if another instance of the given script is running. (This broke in a post-Leopard release)
...
getManagedInstallPrefs() now writes out a 'default' preferences file to /Library/Preferences/ManagedInstalls.plist if the file doesn't exist.
getManagedInstallPrefs() now writes an error message to the log and raises an exception if it can't read the prefs file.
git-svn-id: http://munki.googlecode.com/svn/trunk@190 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-27 16:35:50 +00:00
Greg Neagle
bc34da0157
Fixed formatting errors on removal error messages.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@188 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-26 23:31:14 +00:00
Greg Neagle
d2cf7bf89b
Some post-Leopard changes/tweaks, fixed a UTF-8- issue when working with paths from the pkginfo database, and bumped down the verbosity when importing package data from the pkginfo database.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@186 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 22:42:01 +00:00
Greg Neagle
87597f4d07
Fixed installer's percentage-done output for post-Leopard.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@184 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 17:37:19 +00:00
Greg Neagle
c10965b059
Fixed indentation error on lines 157 and 158.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@183 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 16:33:38 +00:00
Greg Neagle
48b4aee1b2
Changes to better deal with the Leopard+ package database, which does not always preserve the full five-part version number.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@182 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 16:18:25 +00:00
Greg Neagle
802acfc376
Changes to getInstalledPackageVersion(pkgid) to deal with Leopard and later's package database, which does not always preserve the full five-part version number.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@181 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 16:17:05 +00:00
Greg Neagle
8b512d7351
Added Apache License info.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@180 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-25 16:14:47 +00:00
Greg Neagle
5e875ece1c
Added encode('UTF-8') to a log message to work around an issue when the package name as returned by /usr/sbin/installer -pkginfo is a Unicode string (or some accurately, contains unicode characters). This points up a possible issue all throughout the code as far as ASCII vs Unicode string handling.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@179 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-24 18:53:03 +00:00
Greg Neagle
f64408f132
Changed a call from munkicommon.readPlist to FoundationPlist.readPlist.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@178 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-24 17:25:24 +00:00
Greg Neagle
3c84b536f9
Removed warning when /Library/Preferences/ManagedPreferences.plist is missing as it caused a chicken and the egg problem...
...
git-svn-id: http://munki.googlecode.com/svn/trunk@177 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-24 16:55:44 +00:00
Greg Neagle
527a28d083
Fixed typo in getExtendedVersion created when converting from plistlib to FoundationPlist.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@176 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-21 22:29:53 +00:00
Greg Neagle
b60b7dcce0
Fixed getManagedInstallPrefs() to actually read the preferences file (broke it in last commit).
...
git-svn-id: http://munki.googlecode.com/svn/trunk@175 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-21 21:48:13 +00:00
Greg Neagle
445962ec20
Updated makepkginfo to use munkilib/FoundationPlist.py instead of plistlib.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@174 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-20 17:56:12 +00:00
Greg Neagle
a049d87846
Updated munkicommon.py, removepackages.py, installer.py, and updatecheck.py to use munkilib/FoundationPlist.py instead of plistlib.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@173 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-20 17:55:42 +00:00
Greg Neagle
a11b85e970
New munkilib/FoundationPlist.py library to replace plistlib calls with Foundation-based access to plist data. Replaces readPlist(), readPlistFromString(), writePlist(), and writePlistToString().
...
git-svn-id: http://munki.googlecode.com/svn/trunk@172 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-20 17:54:09 +00:00
Greg Neagle
9474d30eaa
More transition from plistlib to Foundation calls for plist handling.
...
Brian Warsing added support for cert-based authentication to secure webservers. Yay!
git-svn-id: http://munki.googlecode.com/svn/trunk@170 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-08-19 18:19:19 +00:00
Greg Neagle
81578497b1
Fixed newline characters when displaying removal errors.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@155 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 21:13:32 +00:00
Greg Neagle
220070abd2
One more reversion to plistlib.readPlist because the NS objects returned by Foundation were making plistlib.writePlist unhappy.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@154 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 20:18:45 +00:00
Greg Neagle
bed9c15733
Yet another reversion to plistlib.readPlist() for another catalog access.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@152 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 16:56:13 +00:00
Greg Neagle
a27cf9dc35
Reverted to using plistlib.readPlist() in getCatalogs() because the Foundation call used by munkicommon.readPlist() assumes the top-level object is a dictionary. The top-level object in catalogs is an array.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@151 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 16:37:47 +00:00
Greg Neagle
423c31340d
Lots of replacing of plistlib.readPlist() with munikcommon.readPlist() so we can handle binary plists.
...
More fixes for JAMF Composer-generated packages.
git-svn-id: http://munki.googlecode.com/svn/trunk@150 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 16:34:02 +00:00
Greg Neagle
7641e26738
Cleanup the munkicommon.tmpdir on exit.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@148 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 14:49:16 +00:00
Greg Neagle
1469d4ddaa
Changes to tmpdir handling; fix for JAMF Composer-generated packages that use non-standard keys in the Info.plist.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@147 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 14:48:14 +00:00
Greg Neagle
dc30a741f8
Print error message if no valid installer item is found on a disk image, and if we can't extract info from .pkg or .mpkg items. Fix for http://code.google.com/p/munki/issues/detail?id=1
...
git-svn-id: http://munki.googlecode.com/svn/trunk@146 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 14:34:25 +00:00
Greg Neagle
377cd3ddc2
Fix for http://code.google.com/p/munki/issues/detail?id=2 , "UnboundLocalError: local variable 'manifest' referenced before assignment"
...
git-svn-id: http://munki.googlecode.com/svn/trunk@145 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-31 14:24:39 +00:00
Greg Neagle
325bc62e5a
Changes to add pkg reference counting so we can correctly remove packages when multiple installed items have packages in common.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@142 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 14:51:18 +00:00
Greg Neagle
6120f285f7
New tmpdir in munkicommon for use by all the other munki tools.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@141 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 14:49:27 +00:00
Greg Neagle
e1f8d4f700
Added support for a new 'installer_choices_xml' key, which supported embedding Installer ChoiceChangesXML files in a pkginfo plist. This allows you to specify custom installs.
...
Since multiple install items could now refer to a single installer pkg/mpkg, we don't automatically delete the installer item after an install completes.Instead we check to see if we're going to need it again...
git-svn-id: http://munki.googlecode.com/svn/trunk@140 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-30 06:32:19 +00:00
Greg Neagle
a7f6f98916
Commented out code that tried to reactivate MunkiStatus.app if it was deactivated when running over the login window. This had unfortunate visual effects if the loginwindow was displaying a dialog asking for permission to use an external account.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@138 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:31:46 +00:00
Greg Neagle
e539e167a4
Minor output message tweaks.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@137 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:30:10 +00:00
Greg Neagle
8fc30b0f51
Suppress warnings when we cannot remove an non-empty directory when that directory is inside a bundle and --forcedeletebundles is true.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@136 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:28:59 +00:00
Greg Neagle
45663239e8
Attempted fix to occasional osascript error.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@135 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:27:25 +00:00
Greg Neagle
5228d462aa
Fix to function to get available space on startup disk.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@134 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:26:36 +00:00
Greg Neagle
9035f9d7aa
Added support for selecting the "correct" installer item based on minimum OS version and supported architectures.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@133 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-27 18:24:51 +00:00
Greg Neagle
dca75a3b6c
Fixed display of filesystem removal errors.
...
Reordered operations so receipts will be removed even if no filesystem items are removed (like in payload-free packages).
Suppress warning when encountering bogus BSD.pkg
git-svn-id: http://munki.googlecode.com/svn/trunk@132 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-24 18:32:45 +00:00
Greg Neagle
0d7c35646d
Fixed display of software removals when detail is suppressed and the last removal item does not require a restart.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@131 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-23 15:13:25 +00:00
Greg Neagle
e022b20e0f
removepackages.py:
...
-Tweaked output - some stuff was getting printed at too low a verbosity level, and percentage-done output wasn't happening at normal verbosity.
-When removing files, changed from using subprocess to call `rm` to using os.remove. This is much faster. I hope it handles resource forks OK...
git-svn-id: http://munki.googlecode.com/svn/trunk@130 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-22 17:27:01 +00:00
Greg Neagle
ef7f0c3fa1
Fixed info on items that can't be installed because there is insufficient disk space. These were being incorrectly reported as ready to install.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@129 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:48:24 +00:00
Greg Neagle
b62cf4fc84
When running at the default verbosity, installer item downloads now show percentage-done feed back. This was a regression caused by the refactoring of the display/print/visual feedback functions.
...
Fixed info on items that can't be installed because there is insufficient disk space. These were being incorrectly reported as ready to install.
git-svn-id: http://munki.googlecode.com/svn/trunk@128 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:47:45 +00:00
Greg Neagle
552c0ebcd8
Added status message for disk mounting (since mounting the iLife dmg took so long...)
...
git-svn-id: http://munki.googlecode.com/svn/trunk@127 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:44:10 +00:00
Greg Neagle
58f99bd1ef
Changed munkicommon.getExtendedVersion to match the observed behavior of Apple packages (iWork and iLife specifically).
...
Added more debug output during the version check process.
git-svn-id: http://munki.googlecode.com/svn/trunk@126 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-21 15:42:48 +00:00
Greg Neagle
54f869c4d5
Fixed error thrown when warning about insufficient disk space to download and install an installer item.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@125 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 21:58:33 +00:00
Greg Neagle
03da6d471b
Added missing Solid Aqua Blue.png resource.
...
git-svn-id: http://munki.googlecode.com/svn/trunk@124 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:37:09 +00:00