Changes to support an Architecture check on packages
Script will now automatically pull the Architecture type from the package (not the App) and set the correct values in the munki pkginfo
@@ -125,6 +125,9 @@ class Adobe2021Versioner(Processor):
self.env['sap_code'] = hd_media.findtext('SAPCode')
self.env['target_folder'] = hd_media.findtext('TargetFolderName')
+ # Check for Processor Architecture
+ self.env['architecture_type'] = option_xml.findtext('ProcessorArchitecture')
+
# If no HDMedia is found, then install_lang will be none
if install_lang is None:
# Get vars for RIBS media
@@ -136,6 +139,7 @@ class Adobe2021Versioner(Processor):
# Display progress
self.output("sap_code: {}".format(self.env['sap_code']))
self.output("target_folder: {}".format(self.env['target_folder']))
+ self.output("architecture_type: {}".format(self.env['architecture_type']))
# Get app_json var
self.env['app_json'] = os.path.join(self.env['PKG'], 'Contents/Resources/HD', \
@@ -444,6 +448,17 @@ class Adobe2021Versioner(Processor):
'version_comparison_key': self.env['vers_compare_key'],
}]
+ # Set Processor Architecture info
+ if self.env['architecture_type'] == "x64":
+ pkginfo['supported_architectures'] = [
+ 'x86_64',
+ 'i386',
+ ]
+ elif self.env['architecture_type'] == "arm64":
+ pkginfo['supported_architectures'] = [
+ 'arm64',
+ ]
+
# Notify of additional_pkginfo
self.env['additional_pkginfo'] = pkginfo
self.output("additional_pkginfo: {}".format(self.env['additional_pkginfo']))
