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.
Use Popen.communicate(timeout=60) to sanely exit "system_profiler SPApplicationsDataType" calls, which are hanging indefinitely on a small number of clients.
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
In cases where unknown exceptions are caught for logging purposes, log and reraise the exception so munki crashes with a Python traceback, instead of exiting.
File "/usr/local/munki/munkilib/munkicommon.py", line 874, in unmountdmg
display_warning('Failed to unmount %s' % (mountpoint, err))
TypeError: not all arguments converted during string formatting
* makepkginfo with installer item - set minimum_os_version as detected
* makepkginfo with installer item and file item(s) - set minimum_os_version as detected
* makepkginfo with file item(s) only - do not provide minimum_os_version, regardless of what we detect
* makepkginfo with --minimum_os_version and any of the above options - set minimum_os_version to argument of --minimum_os_version, regardless of what we detect
This patch also sets flat packages to default to 10.5.0 (instead of 10.4.0 which is used for all other items) and requires that if --minimum_os_version is provided that it starts with a digit.
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.
- 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