Commit Graph

48 Commits

Author SHA1 Message Date
Greg Neagle 6b4ad647c4 Update copyright dates 2025-01-25 15:35:09 -08:00
Greg Neagle aeac6e96a9 Start consolidating functions that deal with date/times and rely less on undocumented pyObjc conversions 2024-04-12 13:56:11 -07:00
Greg Neagle bf1ce5a3d1 Add support for installed application info for conditional expressions 2024-03-02 11:31:26 -08:00
Greg Neagle 2b327569b4 Update copyright dates 2024-01-30 16:14:29 -08:00
Greg Neagle 8edfc6a825 Rename 'board-id' and 'device-id' 'facts' to 'board_id' and 'device_id, respectively. (Hyphens appear to be illegal in attribute names in NSPredicate expressions). Thanks to @mattydee99. See issue #1201. 2024-01-24 14:39:06 -08:00
Greg Neagle dd74af60b1 More gracefully handle exceptions when evaluating a predicate (used in conditional_items and installable_condition). Thanks to @mattydee99. See issue #1201 2024-01-24 14:33:17 -08:00
Greg Neagle 4f8ba52eee Collect board-id or device-id if available and add to Condtions dict for use in conditional_items, etc 2023-12-07 09:38:56 -08:00
Greg Neagle 767f64b12a Update copyright info 2023-02-22 09:59:22 -08:00
Jim Zajkowski 7579ec9a73 add product name fact (#1152)
only works on Apple Silicon
2022-10-19 11:56:53 -07:00
Jim Zajkowski 48632f3905 Change to detecting laptop/desktop by identifying if the system has a battery (#1153)
* flip machine_type to checking for a battery power source

primary author: @gregneagle, on Slack

* move battery detector to powermgr
2022-08-10 11:22:32 -07:00
Greg Neagle 5ee0f5928a Update copyright dates 2022-05-10 16:09:38 -07:00
Greg Neagle 38d8ccaf90 Exit osinstaller if we're called on Apple silicon. Return x86_64 as supported arch in generated pkgino 2021-10-29 11:57:57 -07:00
Greg Neagle 9d3e265cb8 Update copyright dates 2021-02-20 09:05:58 -08:00
Greg Neagle 5f680b9862 Python 3 fixes for IOPlatform and sysctl functions ported from Python 2 :-( 2021-02-05 09:12:10 -08:00
Greg Neagle 0f6d817850 In info.py, get the hardware model without calling system_profiler 2021-02-05 08:09:20 -08:00
Greg Neagle c8b9554d77 Get machine serial number without calling system_profiler. Works around manifest resolution issue when system_profiler times out or otherwise misbehaves. 2021-02-04 16:57:59 -08:00
Greg Neagle 7f736a4901 Nasty hack to return native processor arch even when running under Rosetta 2020-12-02 16:39:52 -08:00
Greg Neagle 11d978bdb3 Add iBridge/T1/T2 into to machine 'facts' dictionary 2020-03-02 16:32:13 -08:00
Greg Neagle 72a0535d0d Update Copyright dates 2020-01-01 08:53:37 -08:00
Greg Neagle 7ff576f159 Python 3 compatibility fixes 2019-07-13 18:21:54 -07:00
Greg Neagle b5bb875884 Better unicode text handling for subprocesses 2019-06-24 21:53:37 -07:00
Greg Neagle 0dddb5dbd5 Lots of Python 3 compatibility changes for munkilib 2019-06-22 22:19:39 -07:00
Greg Neagle 3768eb78cb PyLint cleanups 2019-05-05 11:14:04 -07:00
Greg Neagle 453524a5b0 More Python 3 idiom changes 2019-05-03 21:49:18 -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
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
Greg Neagle 918d0b7391 Update copyright dates 2019-01-02 10:31:50 -08:00
Jim Zajkowski 6af274bd61 Sort the conditionals list so they always run in the same order (#870) 2018-10-16 10:25:20 -07:00
Greg Neagle f438b5def9 Don't exit with an unhandled exception if LaunchServices._LSCopyAllApplicationURLs(None) returns None/nil 2018-06-25 11:28:34 -07:00
Greg Neagle 51efa81942 Merge branch 'master' into Munki3dev 2018-03-27 17:11:31 -07:00
Greg Neagle 332212bfce When using os.uname()[1] to get the hostname, decode('UTF-8') to convert to Unicode 2018-03-23 16:00:53 -07:00
Greg Neagle 82c076aa46 Add os_build_number and os_build_last_component to predicate info object (AKA built-in 'conditions') 2018-02-11 09:12:57 -08:00
Greg Neagle 1428c40d06 Update copyright notices to include 2018 2018-01-20 08:46:22 -08:00
Greg Neagle 25e42ecdb0 Faster iteration of installed apps when searching for matching apps during updatecheck 2017-04-07 16:41:22 -07:00
Greg Neagle 4053a0dbe7 Update copyright dates to 2017 2017-01-17 20:14:31 -08:00
Greg Neagle 24805bd99b Remove 'shebang' line from all Python modules that are not intended to be executed as scripts. This also causes my stupid editor to stop marking these files as executable. 2017-01-11 16:03:33 -08:00
Greg Neagle 2e905b0dea Once again remove executable bits that are getting set 2017-01-10 09:03:30 -08:00
Greg Neagle e605490e95 Lots of PyLint clean ups 2017-01-10 08:59:41 -08:00
Greg Neagle 9021d40f72 Change relative import style 2017-01-06 15:10:36 -08:00
Greg Neagle 883dcef799 Memoize get_version since it won't change during a run 2017-01-03 08:20:12 -08:00
Greg Neagle 41153d3a86 Remove execute bit from most munkilib/*.py files 2017-01-02 16:07:55 -08:00
Greg Neagle 172a009af2 PyLint cleanups 2016-12-31 17:33:05 -08:00
Greg Neagle 10a6950837 Consistent if __name__ == '__main__': bit for all munkilib submodules 2016-12-24 08:17:08 -08:00
Greg Neagle e1d5beed6d Move item comparison functions from updatecheck.py to new compare.py module 2016-12-22 11:04:45 -08:00
Greg Neagle c386ede21c Move Memoize decorator to utils module 2016-12-17 09:24:15 -08:00
Greg Neagle 8a6a7bb13e Reorg of modules under munkilib; I might chnage my mind again... 2016-12-16 19:02:17 -08:00