Commit Graph

189 Commits

Author SHA1 Message Date
William Theaker
e2d88c0091 Indicate default option y/n choices (#970)
* Indicate default option for repoclean

* Indicate default choice
2020-01-07 15:35:44 -08:00
Greg Neagle
72a0535d0d Update Copyright dates 2020-01-01 08:53:37 -08:00
Greg Neagle
ca7392ee8d Safer handling of bytestrings when making a diskimage 2019-07-23 16:41:49 -07:00
Greg Neagle
af51af5cdd Change all sh-bang lines to #!/usr/local/munki/python 2019-07-16 22:14:47 -07:00
Greg Neagle
7ff576f159 Python 3 compatibility fixes 2019-07-13 18:21:54 -07:00
Greg Neagle
ff6248daaf More Python3 compatibility changes 2019-06-23 09:51:22 -07:00
Greg Neagle
172805f45b Remove no-longer needed print_fn definition 2019-06-04 16:23:46 -07:00
Greg Neagle
f1df5d96a6 Pylint fixes 2019-05-05 12:48:15 -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
Greg Neagle
48d9c296b2 munkiimport: if no options or arguments are given, print usage 2018-04-19 15:37:39 -07:00
Greg Neagle
c837176d19 Add 'featured' to the list of key/values to copy from the previous pkginfo. Fixes #815. 2018-04-18 13:47:53 -07:00
Greg Neagle
4f8b47746d Fix for #829. munkiimport: Don't crash with IndexError when --apple-update option is used. 2018-01-24 14:54:04 -08:00
Greg Neagle
1428c40d06 Update copyright notices to include 2018 2018-01-20 08:46:22 -08:00
Greg Neagle
ce5ddf2193 munkiimport: Fix issue where pkgs/ was prepended to the relative pkg path in the pkginfo. 2017-11-27 07:01:52 -08:00
Greg Neagle
833cd18806 Make some functions in munkiimportlib.py less chatty to make them easier to use in other code 2017-11-26 17:32:15 -08:00
Greg Neagle
dd6e936e80 munkiimport now calls code in munkilib/admin/makecatalogs.py to rebuild catalogs instead of subprocessing makecatalogs 2017-11-19 17:56:09 -08:00
Greg Neagle
dbf0c95b9d Move munkiimportlib.py and pkginfolib.py into munkilib/admin 2017-11-19 08:39:22 -08:00
Greg Neagle
810d5d833d Move lots of munkiimport functions into munkilib/munkiimportlib.py so they can be called by other code 2017-11-19 07:04:44 -08:00
Greg Neagle
b27aefe373 munkiimport now calls code in munkilib/pkginfolib to generate a pkginfo instead of subprocessing makepkginfo. 2017-11-18 15:09:16 -08:00
Arjen van Bochoven
21927438ae Localized pkgsinfo support (#809)
* Add support for localized_strings in pkgsinfo files

* Update Munkiitems.py

Use NSBundle.preferredLocalizationsFromArray_forPreferences_ instead of
NSLocale.currentLocale

* Move localized_strings to GenericItem

And add localized_strings to iteminfo

* Add localized_strings to munkiimport
2017-10-13 09:03:05 -07:00
Greg Neagle
c45b5e854b munkiimport: When attempting to get info on existing pkgs in the repo, only print a warning about failure to read catalogs/all if there are any items in pkgsinfo. Better first-import experience for new repos. 2017-09-08 11:00:46 -07:00
Greg Neagle
2826e601b4 Display an error and exit if no repo URL is defined or provided instead of crashing 2017-07-24 09:36:39 -07:00
Greg Neagle
4250ab564f munkiimport: When creating a disk image, explicitly specify HFS+ format 2017-07-03 12:56:32 -07:00
Clayton Burlison
e73c9bc652 fix: Don't print blank lines during munkiimport (#755) 2017-04-25 20:36:14 -07:00
Clayton Burlison
5e754bc5e7 fix: Remove duplicate --plugin flag (#751)
This removes the duplicate --plugin flag from the help menu of:
* iconimporter
* makecatalogs
* munkiimport
* repoclean
2017-04-22 00:03:43 -05:00
Greg Neagle
a64b1d7ab3 Add 'startosinstall' support to iconimporter, makepkginfo, and munkiimport 2017-04-01 12:33:35 -07:00
Greg Neagle
e697441de4 munkiimport: If plugin is not given at the CLI or available via preferences, set options.plugin to 'FileRepo' so it is properly forwarded to makecatalogs 2017-03-15 08:59:08 -07:00
Greg Neagle
aa437f7895 munkiimport: special case handling of FileRepo (and children) when 'importing' a pkg already in the repo's pkgs directory 2017-03-15 08:46:10 -07:00
Greg Neagle
70f2800170 munkiimport: Minor wording change when printing warnings/errors at the end of a makecatalogs run 2017-03-14 07:12:22 -07:00
Greg Neagle
e042a2c8d5 Move many functions shared by the various cli tools to munkilib/cliutils.py 2017-03-13 08:03:23 -07:00
Greg Neagle
553eb503e9 munkiimport: Add a TODO 2017-03-11 19:40:21 -08:00
Greg Neagle
a9f1bf672c For an API repo, munkiimport can now forward the repo.authtoken to makecatalogs 2017-03-11 18:59:22 -08:00
Greg Neagle
d1d3f5dcd2 Move code that uses FileRepo as a default if no repo is specified to munkilib/munkirepo/__init__.py 2017-03-11 09:06:09 -08:00
Greg Neagle
a5a9c9e73d Get rid of global variables; improve handling of options that could be defined in prefs or via cli options 2017-03-11 08:55:49 -08:00
Greg Neagle
60bea033cf Extra caution to always default to FileRepo if plugin value is None or '' 2017-03-10 12:16:37 -08:00
Greg Neagle
f327063a07 Merge branch 'Munki3' into new_repo_abstraction 2017-03-10 09:02:53 -08:00
Greg Neagle
d13a6c9926 Update prompt text for --configure 2017-03-10 06:59:27 -08:00
Greg Neagle
112aa3caa2 munkiimport: Remove prompt for repo_path 2017-03-09 18:38:51 -08:00
Greg Neagle
c3402ffce2 Minor naming changes 2017-03-09 10:17:47 -08:00
Per Olofsson
c773ebe7ac Implement featured_installs array in manifests. 2017-03-09 13:25:48 +01:00
Greg Neagle
f9ac3c776b makecatalogs and munkiimport working with new-style FileRepo plugin 2017-03-08 21:53:46 -08:00
Greg Neagle
9f3434c388 munkiimport working with new-style repo plugins 2017-03-08 13:54:13 -08:00
Greg Neagle
f47cd6ac1a Fix several incorrect .encode() methods called on strings returned from subprocess .readline() -- replace with .decode() method 2017-03-05 07:49:41 -08:00
Greg Neagle
0829c2406c Fix several incorrect .encode() methods called on strings returned from subprocess .readline() -- replace with .decode() method 2017-03-05 07:49:02 -08:00
Greg Neagle
ba0cb7c836 Missed an instance variable rename 2017-03-04 20:00:20 -08:00
Greg Neagle
0fb1d3cefa Begin reorg of repo plugins code 2017-03-04 08:19:29 -08:00