Commit Graph

2101 Commits

Author SHA1 Message Date
Greg Neagle
d3fa3680b3 If softwareupdate launchd job fails, return the expected dictionary structure, not an integer return code 2019-05-14 13:52:14 -07:00
Greg Neagle
f1df5d96a6 Pylint fixes 2019-05-05 12:48:15 -07:00
Greg Neagle
3768eb78cb PyLint cleanups 2019-05-05 11:14:04 -07:00
Greg Neagle
97a64a1eb5 PyLint cleanups 2019-05-05 09:51:59 -07:00
Greg Neagle
45d4f78d2c PyLint cleanups 2019-05-05 09:26:42 -07:00
Greg Neagle
4487595fba PyLint cleanups 2019-05-04 07:30:42 -07:00
Greg Neagle
5b82366356 Replace an instance of 'Except foo, bar' with 'Excpet foo as bar' 2019-05-03 22:16:28 -07:00
Greg Neagle
4f51efc324 More octal literal fixes for Python 3 compatibility 2019-05-03 22:14:00 -07:00
Greg Neagle
6cf394ad4b Octal literal fixes for Python 3 compatibility 2019-05-03 22:12:17 -07:00
Greg Neagle
23ba0f98ec Some more type/isinstance replacements 2019-05-03 22:02:08 -07:00
Greg Neagle
6bc83d08e6 Replace 'type(foo) == bar' with 'isinstance(foo, bar)' to fit Python 3 idiom 2019-05-03 21:57:05 -07:00
Greg Neagle
453524a5b0 More Python 3 idiom changes 2019-05-03 21:49:18 -07:00
Greg Neagle
e1dcb7e198 Python 3 idiom fix 2019-05-03 21:45:23 -07:00
Greg Neagle
8ede35a75f Fix import in munkilib/munkirepo/GitFileRepo.py to be absolute for Python 3 compatibility 2019-05-03 21:39:02 -07:00
Greg Neagle
df60207145 Add 'from __future__ import absolute_import' to all files to enforce Python3-style imports 2019-05-03 21:34:56 -07:00
Greg Neagle
531d99a01a Convert all print statements to Python3-compatible print functions 2019-05-03 19:47:37 -07:00
Elliot Jordan
2ad27ff411 Align except clauses with PEP 3110 (#933)
This should work for Python 2.6+, including 3.
https://www.python.org/dev/peps/pep-3110/#compatibility-issues
2019-05-03 15:05:13 -07:00
Greg Neagle
137741e7f7 Attempt to work around another softwareupdate bug 2019-05-01 11:01:39 -07:00
Greg Neagle
06eee7c353 Bumping version for future development round 2019-04-23 06:27:23 -07:00
Greg Neagle
c10ee6072b Merge branch 'master' into Munki3dev 2019-04-22 11:38:08 -07:00
dcoobs
731dbfadb9 Fix output typo in manifestutils.py (#929) 2019-04-16 11:34:31 -07:00
Greg Neagle
af1cf640b4 Fix recording of install requests to application_usage.
This has been broken for a year -- since the refactor into user-agent and root-daemon.
2019-04-12 20:39:50 -07:00
Greg Neagle
bc25f0ea4d Log/display warning if ptyexec is not found and we fall back to /usr/bin/script 2019-04-03 08:20:41 -07:00
Greg Neagle
fb4230fc8c Bump version for future release 2019-04-02 09:16:45 -07:00
Greg Neagle
17dfb548cf More tweaks and clean ups 2019-04-02 09:08:39 -07:00
Greg Neagle
9783313223 Improvements in determining available/pending Apple updates.
Use "softwareupdate -l --no-scan" output to filter the list of available
updates in macOS 10.11+. This addresses an issue observed in 10.13 and
10.14 where com.apple.SoftwareUpdate's RecommendedUpdates sometimes
listed updates that were no longer applicable.
2019-04-01 16:48:10 -07:00
Greg Neagle
8c3f9a6c93 Continuing the refactor: replace _run_softwareupdate method with calls to su_tool.run 2019-03-29 17:02:11 -07:00
Greg Neagle
4067ffa0bf Add new code/client/munkilib/appleupdates/su_tool.py as part of refactoring 2019-03-29 15:34:36 -07:00
Greg Neagle
be95661838 Refactoring 2019-03-27 09:51:32 -07:00
Greg Neagle
fe8c7f93f2 appleupdates: Remove code for pre-macOS 10.10 2019-03-20 18:23:51 -07:00
Greg Neagle
eede2e8e3c Bumping version for future release 2019-03-20 11:59:22 -07:00
Greg Neagle
e81ed8be18 Display status of an item install before running a preinstall script, if any. Fixes #915 2019-03-10 15:58:05 -07:00
Greg Neagle
f890235044 Fix an issue that would cause Munki to fail to reboot after installing updates that require a reboot when no-one is logged in. 2019-02-18 07:39:43 -08:00
Elliot Jordan
d14c4304ea Various typo fixes and spelling corrections (#907)
* Fixed "No Comment" typo in strings files

* Fix "problem updates" typo

* Fix "caught" typo

* Fix "pseudo" typo

* Fix "instantiated" typo

* Fix "explicitly" typo

* Fix "osascript" typo

* Spelling fixes and various other corrections

* Fix two more instances of "Logput"

* Fixed a few remaining spelling issues in python files

* Fix "because" typo

PR also submitted upstream to the Murky project for the same correction.

* Fix name of associated app

* Additional spelling corrections in comments/docstrings
2019-02-14 08:30:43 -08:00
Elliot Jordan
435719eb3c Set owner and group at the same time (#906) 2019-02-14 08:24:40 -08:00
Greg Neagle
97dcaa380c Improvements in listing available Apple updates.
When com.apple.SotwareUpdate's RecommendedUpdates is not defined or empty, don't fall over to /Library/Upates/index.plist information unless we are on 10.8 or earlier.
Addresses an issue where Munki would sometimes claim downloaded but no longer applicable Apple updates were pending.
2019-02-08 15:21:38 +01:00
Elliot Jordan
b5edd2481e Minor typo fix (#904) 2019-02-02 08:37:04 -08:00
Greg Neagle
e10fed04ee Defend against badly-authored packages that define their installKBytes as a float instead of an integer. Addresses #902. 2019-01-30 09:15:11 -08:00
Greg Neagle
80a844eb13 If an item to be precached contains PackageURL or PackageCompleteURL keys, store those for use by the precaching agent. 2019-01-15 11:55:17 -08:00
Elliot Jordan
5797477305 Minor typo fix in docstring (#900) 2019-01-15 09:04:26 -08:00
Greg Neagle
125e9c6471 Precaching improvements so that managedsoftwareupdate won't remove partially precached items, and that precache_agent is stopped when managedsoftwareupdate does an updatecheck 2019-01-09 08:23:00 -08:00
Greg Neagle
a73ea66162 Provide switch for MunkiStatus output so precache_agent can switch it off. Addresses #897 2019-01-08 11:00:41 -08:00
Greg Neagle
42a291436d Fix logic error in download.uncache() function that caused it to check filesize for not-yet-downloaded items 2019-01-08 10:58:16 -08:00
Greg Neagle
4f44643a4a Also precache items where precache=True and needs_update=True 2019-01-03 09:39:34 -08:00
Greg Neagle
918d0b7391 Update copyright dates 2019-01-02 10:31:50 -08:00
Greg Neagle
6ef70c0424 Fix and tweak detection of need to shutdown for apple updates 2018-12-18 08:23:47 -08:00
Greg Neagle
19362c77e9 Log shut down actions no matter the logging level; don't require halt message to be at the beginning of a softwareupdate output line 2018-12-17 16:13:00 -08:00
Greg Neagle
6e18c61190 Merge branch 'softwareupdate-shutdown-master' of https://github.com/weswhet/munki into weswhet-softwareupdate-shutdown-master 2018-12-11 21:42:27 -08:00
Greg Neagle
4115df99bd Better messaging around shut downs 2018-12-11 12:11:05 -08:00
Greg Neagle
7339391cb5 Simplify return value logic in doInstallTasks() 2018-12-11 11:25:05 -08:00