mirror of
https://github.com/munki/munki.git
synced 2026-01-05 14:10:00 -06:00
makepkginfo now can parse an app's Info.plist's LSMinimumSystemVersionByArchitecture (if it exists) for minimum_os_version information
This commit is contained in:
@@ -327,6 +327,13 @@ def getiteminfo(itempath):
|
||||
infodict[key] = plist[key]
|
||||
if 'LSMinimumSystemVersion' in plist:
|
||||
infodict['minosversion'] = plist['LSMinimumSystemVersion']
|
||||
elif 'LSMinimumSystemVersionByArchitecture' in plist:
|
||||
# just grab the highest version if more than one is listed
|
||||
versions = [item[1] for item in
|
||||
plist['LSMinimumSystemVersionByArchitecture'].items()]
|
||||
highest_version = str(max([munkicommon.MunkiLooseVersion(version)
|
||||
for version in versions]))
|
||||
infodict['minosversion'] = highest_version
|
||||
elif 'SystemVersionCheck:MinimumSystemVersion' in plist:
|
||||
infodict['minosversion'] = \
|
||||
plist['SystemVersionCheck:MinimumSystemVersion']
|
||||
|
||||
Reference in New Issue
Block a user