Commit Graph

34 Commits

Author SHA1 Message Date
John Randolph
0dfd915f55 change this module to use munkicommon.getOsVersion() instead of os.uname()
splitting.

(also, our whitespace filter whacked many other lines)



git-svn-id: http://munki.googlecode.com/svn/trunk@1290 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-08-11 21:29:21 +00:00
Greg Neagle
35282d5115 Fixes for new preinstall_script and postinstall_script functionality.
git-svn-id: http://munki.googlecode.com/svn/trunk@1059 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2011-03-08 22:10:08 +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
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
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
b52f45cdf0 More print statement cleanup.
git-svn-id: http://munki.googlecode.com/svn/trunk@821 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-10-19 17:22:55 +00:00
Greg Neagle
b0619cf035 pylint cleanup: mark unused variables
git-svn-id: http://munki.googlecode.com/svn/trunk@750 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-09-13 17:35:32 +00:00
Greg Neagle
e7ad493e61 pylint cleanups.
git-svn-id: http://munki.googlecode.com/svn/trunk@651 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-08-04 17:20:00 +00:00
Greg Neagle
6d83d3354e removepackages.py: updated copyright info, better exception handling on package/bom import
git-svn-id: http://munki.googlecode.com/svn/trunk@590 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-07-21 03:07:37 +00:00
Greg Neagle
ccd1635a80 Fix to removepackages.py to properly import pkg data from pkgutil database under Snow Leopard when there are items in /Library/Receipts/boms, presumably left over from Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@541 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-06-01 16:47:45 +00:00
Greg Neagle
2fa1aa7e33 Some changes to make removepackages work with the QuarkXPress 8.x packages. These are broken in some subtle way such that under Snow Leopard, they leave receipts in /Library/Receipts/. When trying to remove them, pkgutil by itself does not provide the IFPkgRelocatedPath info we need to find the installed items, so we have to dig into the old-style bundle packages as well.
Also, changing the search order in getpkgkeys() - previously it searched on package names first, and if that failed to turn up anything, it searched on pkgids.  Since normally we have a package id to work with, searching on pkgids first gives us better results. 

git-svn-id: http://munki.googlecode.com/svn/trunk@516 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2010-03-17 22:03:20 +00:00
Greg Neagle
90ceeeaa8e Added code to removepackages.py to deal with evil packages that put receipts under /Library/Receipts, even in Snow Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@379 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-23 17:01:34 +00:00
Greg Neagle
793b48baaf Reformatted help strings
git-svn-id: http://munki.googlecode.com/svn/trunk@366 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 05:57:05 +00:00
Greg Neagle
27728a7441 Reformatted option help strings
git-svn-id: http://munki.googlecode.com/svn/trunk@365 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 05:54:57 +00:00
Greg Neagle
5a2bf9e3d8 Exception handling cleanup
git-svn-id: http://munki.googlecode.com/svn/trunk@364 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 05:53:11 +00:00
Greg Neagle
510ca09f0e More PEP-8 cleanup
git-svn-id: http://munki.googlecode.com/svn/trunk@350 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 01:43:13 +00:00
Greg Neagle
00f7ba39e5 PEP-8 line length cleanup. Wasn't sure how to break the sqlite3 commands, so left them alone.
git-svn-id: http://munki.googlecode.com/svn/trunk@348 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-18 00:04:54 +00:00
Greg Neagle
e165e62b49 git-svn-id: http://munki.googlecode.com/svn/trunk@327 a4e17f2e-e282-11dd-95e1-755cbddbdd66 2009-11-16 17:23:38 +00:00
Greg Neagle
3fa262ea69 - Lots of logging changes: new munkicommon.display_warning() function to more cleanly separate warnings from errors. New warnings.log, errors.log, and Installs.log. logs are now rotated, so they won't grow forever.
- new munkicommon.pref keys: CatalogURL and PackageURL; these replace SoftwareRepoURL, and are base URLs for catalogs and installer items respectively. This allows you to divide up hosting of the munki pieces on multiple servers -- manifests and catalogs could be on one server, and the actual install packages on another.

git-svn-id: http://munki.googlecode.com/svn/trunk@316 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-11-05 17:38:39 +00:00
Greg Neagle
96251a968e Fix in special-case processing of Microsoft Office 2008 packages on Snow Leopard.
git-svn-id: http://munki.googlecode.com/svn/trunk@244 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-10-02 22:01:14 +00:00
Greg Neagle
97afbb6e5e More unicode fixes. Sigh.
git-svn-id: http://munki.googlecode.com/svn/trunk@211 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-14 23:17:57 +00:00
Greg Neagle
c682eaa717 Changed from #!/usr/bin/env python to #!/usr/bin/python because we need to use Apple's installed Python, and not whatever python the user happens to be using...
Unicode fixes.

Fixed handling of the install path - some receipts record this with a trailing slash, some do not. If there was no trailing slash, the final filesystem item path was incorrect.

git-svn-id: http://munki.googlecode.com/svn/trunk@206 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-09-14 16:48:50 +00:00
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
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
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
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
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
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
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
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
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
d465661386 Much refactoring - common output/status functions are now in munkicommon.py and used by installer.py, updatecheck.py, and removepackages.py.
Since the HTTP stuff was used only by updatecheck.py, moved it from munkicommon.py into updatecheck.py.
The above changes made this easier: Added munkistatusoutput support to updatecheck.py

git-svn-id: http://munki.googlecode.com/svn/trunk@122 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-20 18:30:17 +00:00
Greg Neagle
07cfc5235c Moved all support libraries into munkilib package.
Combined installcheck and managedinstaller into managedsoftwareupdate to avoid race conditions between the two tools.
Removed support for Apple Software Updates (because it didn't work correctly!)


git-svn-id: http://munki.googlecode.com/svn/trunk@112 a4e17f2e-e282-11dd-95e1-755cbddbdd66
2009-07-14 18:04:34 +00:00