Commit Graph

164 Commits

Author SHA1 Message Date
Greg Neagle 9f4a4f198a PyLint cleanup 2016-04-25 13:21:09 -07:00
Justin McWilliams 34d4a0863e Re-add pylint enable-mgr=E0611, which was a temporary ignore of Foundation modules being unknown 2016-04-25 13:29:57 -04:00
Justin McWilliams 81bc9ddb68 Re-add pylint disable-msg=C0103 to ignore camelCase names 2016-04-25 13:28:12 -04:00
Justin McWilliams 396f05bf50 Create "no idle sleep" assertions while downloading packages.
This is especially helpful when downloading large packages and/or while
on slow network connections, avoiding "inactivity" causing machines to sleep
and package downloads to fail.
2016-04-22 17:07:35 -04:00
Greg Neagle e69a000dc7 Fix improper logging call leading to extra log files when using removepackages to remove items 2016-04-21 17:43:04 -07:00
Greg Neagle 12d4f0d27e Update copyright info on files; remove abandoned tools from code/tools 2016-03-15 09:32:28 -07:00
Greg Neagle c6ec424be1 When copying items from a disk image, use instead of . This preserves hfsCompression and filters out com.apple.quarantine xattrs while copying. Thanks to @VitosX on GitHib. (Issue #570) 2016-03-15 08:19:31 -07: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 a3d0c492fe Add support for pkginfo 'OnDemand' key to enable on-demand tasks 2015-03-14 19:29:14 -07:00
Greg Neagle d8c06093b0 Instead of reading (possibly signed) profile after install in order to get the PayloadIdentifier, just use the PayloadIdentifier from the pkginfo item. 2015-01-26 21:33:53 -08:00
Greg Neagle e660411348 When installing a profile, properly get and record the result of the install 2015-01-16 12:04:39 -08:00
Greg Neagle 9c9ac8dcdd On items_to_copy, if destination_path is not specified, extract path from destination_item if it exists 2015-01-15 07:00:48 -08:00
Greg Neagle 83fabfb5ce Add support for importing, installing and removing configuration profiles. 2014-12-16 21:57:41 -08:00
Greg Neagle 801cc39a34 Fix installer.py error calling munkistatus.message() with multiple arguments 2014-10-29 06:39:18 -07:00
Greg Neagle c4017c9aef PyLint cleanups 2014-10-26 11:34:09 -07:00
Greg Neagle 564e4ac368 Change munkicommon.tmpdir to a function so that importing munkicommon does not create orphaned munki-foo directories in /tmp 2014-10-25 10:06:37 -07:00
Greg Neagle 553ac2bc42 Record install and removal errors to InstallInfo.plist for use by Managed Software Center.app 2014-04-07 10:28:01 -07:00
Greg Neagle 72fd2ad0e6 Display insufficent disk space info if relevant 2014-03-17 16:05:12 -07:00
Greg Neagle 52695b9c6a After a successful install, set 'needs_update' to false for optional item info. Fixes issue 293 2014-03-14 16:19:42 -07:00
Greg Neagle 61dccd3fbb installer.py should not raise an exception if 'RemovalResults' or 'InstallResults' is missing from the report. 2014-03-11 16:32:12 -07:00
Greg Neagle ae6bd497a3 Rename some name/display_name variables in processRemovals to better reflect their actual contents and purpose 2014-01-24 15:02:18 -08:00
Greg Neagle 8ea6dc51c6 Record item name and not display_name for name key in the report's 'RemovalResults'. Enables correct update of optional_installs installation status. 2014-01-24 14:42:20 -08:00
Greg Neagle 60b5bdd1a9 Change format of munkicommon.report['RemovalResults'] to a list of dictionaries instead of a list of strings. This may affect reporting products that use this info. InstallInfo.plist is now always rewritten to disk after an install session instead of being deleted in some cases. 2014-01-24 12:00:13 -08:00
Greg Neagle fddd138000 Bumping version to 1.0.0. Updated copyright dates. 2014-01-10 08:20:15 -08:00
Justin McWilliams b5006d2345 Revert Revision dcbfaa74bc, which randomized installs/removals order. This breaks dependencies chains which are baked into the list order. 2013-12-03 11:28:33 -05:00
Justin McWilliams dcbfaa74bc Randomize order of installs and removals, to prevent a single hanging/crashing/etc. package from continually preventing others from being processed. 2013-12-03 10:32:34 -05:00
Justin McWilliams dd712b5d3a Track whether an update was installed in "only_unattended" mode or not in InstallResults, for additional reporting on various Munki servers. 2013-06-16 11:18:49 -04:00
Greg Neagle 220cf91a77 Don't remove an item if another item that depends on it failed to be removed. This is the complimentary behavior to issue 217, which dealt with installs 2013-03-12 19:16:51 -07:00
Greg Neagle b28677dd34 If preinstall_script exits non-zero or installation fails, add item to skipped installs; for each install, if a prerequisite was skipped, don't install. Addresses issue 217. 2013-03-12 16:48:27 -07:00
Greg Neagle 000d1b969a PyLint cleanups in munkilib/installer.py. 2013-03-02 21:13:56 -08:00
Greg Neagle 4b71ace130 Updated copyright info on all files with copyright info. 2013-01-28 11:55:09 -08:00
Justin McWilliams 2cc9bd5f11 Don't delete package from cache if installation fails. If the package is corrupt, hash/etags should not match the server and it'll redownload. Furthermore, if the install was actually successful regardless of a non-zero installer exit code, the cached package will be downloaded on the next Munki execution after determining that package is no longer needed.
As discussed here: https://groups.google.com/forum/?fromgroups=#!topic/munki-dev/Q5UxFOf6En8
2012-11-29 15:50:40 -05:00
Greg Neagle ed39d81485 Using the launchd module to call /usr/sbin/installer introduced a bug where we did not capture stderr when an install failed. This commit fixes that; stderr is now correctly logged and reported. 2012-11-15 13:45:18 -08:00
Justin McWilliams 2a020e871b When a user clicks Stop while processing removals, Munki should not crash.
Fixes this traceback:
   Traceback (most recent call last):
   File '/usr/local/munki/managedsoftwareupdate', line 849, in main()
   File '/usr/local/munki/managedsoftwareupdate', line 705, in main
   mustrestart = doInstallTasks()
   File '/usr/local/munki/managedsoftwareupdate', line 225, in doInstallTasks
   need_to_restart = installer.run(only_unattended=only_unattended)
   File '/usr/local/munki/munkilib/installer.py', line 1169, in run
   removallist, only_unattended=only_unattended)
   TypeError: 'bool' object is not iterable
2012-11-05 16:29:21 -05:00
Greg Neagle 703c8a7ff0 Use IOKit bindings to assert no idle sleep. Thanks to Michael Lynn, pudquick@github 2012-08-16 12:09:10 -07:00
Greg Neagle 8ef3c3ec79 Add doc string to installer.assertNoIdleSleep(); fix use of undefined 'cmd' variable. 2012-08-15 15:41:22 -07:00
Greg Neagle 80cec70612 Add some comments to make clear how the sleep assertion is released. 2012-08-15 15:27:07 -07:00
Greg Neagle 1a9ba0c027 installer.run() now attempts to prevent idle sleep during an install session. 2012-08-15 14:35:47 -07:00
Timothy Sutton d1be50ea42 Added exception handling for case where we invoke os.makedirs() on missing destination_path 2012-08-10 14:04:25 -04:00
Timothy Sutton fad5ea741a Create missing destination directories for copy_from_dmg.
In case a copy_from_dmg's destination directory doesn't exist,
create it and any missing parent directories, setting ownership and permissions based on the first available parent.
2012-07-22 00:05:33 -04:00
Timothy Sutton 93ca31bd3b Further refactoring for hasValid extension check functions
- hasValidPackageExt(), hasValidDiskImageExt() for the appropriate
  extensions, and hasValidInstallerItemExt() to call them
- replace many checks to use the above
- munkiimport.py now uses munkicommon.isApplication() to do the
  equivalent of checking endswith('.app')
- fix an errand merge ancestor from an old unrelated munkiimport
  branch
2012-07-11 13:56:23 -04:00
Greg Neagle 0a928661b8 PyLint cleanups 2012-07-02 10:42:59 -07:00
Greg Neagle 422a9fe28a Merge https://code.google.com/r/arjenvanbochoven-munki 2012-07-02 09:40:04 -07:00
Arjen van Bochoven 0b495c7a14 Changed package_less install flag to installer_type=nopkg 2012-07-02 11:57:38 +02:00
Arjen van Bochoven 6f7ddf7b59 Added ! to installer_item to make it less likely someone uses this as filename 2012-07-01 08:19:26 +02:00
Arjen van Bochoven 01ddeb765d Added packageless_install 2012-06-30 22:52:22 +02:00
Heig Gregorian 6f7699b002 Simplified by determining 'full_destpath' which changes depending on if 'destination_item' has been supplied
Addition of 'full_destpath' cuts down on redundant checks against
'dest_itemname' at various stages in the process.
2012-06-30 10:44:49 -07:00
Heig Gregorian e1504af2b0 Merge branch 'master' into installer-copy_as 2012-06-29 11:04:07 -07:00
Greg Neagle 2ac7f26720 Add support for 'installcheck_script' in pkginfo 2012-06-28 11:08:22 -07:00
Heig Gregorian 58dbc9fb95 Added check for 'destination_item' when processing 'remove_copied_items' so that the correct item is removed. 2012-06-22 09:47:20 -07:00