Commit Graph

56 Commits

Author SHA1 Message Date
Greg Neagle
9d697838dc Refactor removepackages 2017-01-10 16:17:48 -08:00
Greg Neagle
e605490e95 Lots of PyLint clean ups 2017-01-10 08:59:41 -08:00
Greg Neagle
0e56d0bae3 Change references to munkicommon to new modules; PyLint cleanup 2017-01-06 16:18:43 -08:00
Greg Neagle
9021d40f72 Change relative import style 2017-01-06 15:10:36 -08:00
Greg Neagle
1c7b6d5e2e Post status notifications in installer.py and removepackages.py even if munkistatusoutput is not set 2016-12-25 11:26:24 -08:00
Greg Neagle
24378e9c5d Remove more 10.5-specific code from removepackages.py 2016-12-16 15:33:42 -08:00
Greg Neagle
4fb0943d4a Remove all 10.5 and earlier support from removepackages.py 2016-12-16 15:29:08 -08:00
Greg Neagle
61120839db Set global verbose and munkistatusoutput variables via munkicommon.display module 2016-12-14 15:17:17 -08:00
Greg Neagle
143fb90af4 When looking for a receipt id in the old /Library/Receipts location, make sure /Library/Receipts actually exists! 2016-07-22 19:29:42 -07:00
Greg Neagle
12d4f0d27e Update copyright info on files; remove abandoned tools from code/tools 2016-03-15 09:32:28 -07:00
Nick McSpadden
b92285ce7d Fixed some typos 2016-03-07 18:44:40 -08:00
Samuel Keeley
5c12185da4 Replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0 2015-11-13 20:35:24 -08:00
Greg Neagle
d0c1c40353 Special case for Office 2011 updaters when building lists of files; install location should be empty string 2015-03-22 09:55:19 -07:00
Greg Neagle
ca355d0289 Special case for Office 2011 updaters when building lists of files 2015-03-22 09:08:44 -07:00
Greg Neagle
284bdd346a PyLint cleanups 2014-10-27 08:19:15 -07:00
Greg Neagle
423ec8b790 PyLint cleanup: replace all unused_foo variables with dummy_foo variables to make PyLint happy 2014-10-26 11:42:33 -07:00
Greg Neagle
36dc30920d start of changes to implement NSDistributedNotifications for IPC between managedsoftwareupdate and the GUI apps 2014-02-10 15:47:58 -08:00
Greg Neagle
fddd138000 Bumping version to 1.0.0. Updated copyright dates. 2014-01-10 08:20:15 -08:00
Greg Neagle
4b71ace130 Updated copyright info on all files with copyright info. 2013-01-28 11:55:09 -08:00
Justin McWilliams
b31e82905f When logging/display messages/etc., use arguments instead of explicit string formatting, to avoid the following traceback:
File '/usr/local/munki/munkilib/removepackages.py', line 611, in initDatabase
         munkicommon.display_detail('Importing %s...' % pkg)
         File '/usr/local/munki/munkilib/munkicommon.py', line 393, in display_detail
         log(u' ' + msg)
         UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 36: ordinal not in range(128)

When passing arguments, str_to_ascii (via concat_log_message) drops characters it cannot decode.
2012-11-09 15:26:16 -05:00
Greg Neagle
2a1cf963e4 Fix issue where managedsoftwareupdate --auto or --quiet would print percentage-done indicators to STDOUT when checking for Apple updates or when removing packages. 2012-02-15 15:17:09 -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
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