From 75e0722e8fffde654cfd43713e6f8d406d0bedcd Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Tue, 24 May 2016 14:35:07 -0700 Subject: [PATCH] makepkginfo now can parse an app's Info.plist's LSMinimumSystemVersionByArchitecture (if it exists) for minimum_os_version information --- code/client/makepkginfo | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/client/makepkginfo b/code/client/makepkginfo index 8c4b3186..933f2e1d 100755 --- a/code/client/makepkginfo +++ b/code/client/makepkginfo @@ -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']