Write all available conditions (admin-provided and built-in) to a 'Conditions' dict in 'ManagedInstallReport.plist'

Previously, admin-provided conditions were written to the
'ConditionalItems' dict.  Some built-in information was also being
written to the 'MachineInfo' dict, however this is not fully
representative of all built-in conditions that are collected.  Since
INFO_OBJECT is used as the basis for predicate comparison, its entirety
will be written to the 'Conditions' dict in
'ManagedInstallReport.plist', replacing 'ConditionalItems'.  The
'MachineInfo' dict will remain untouched as it is used for reporting
mechanisms.
This commit is contained in:
Heig Gregorian
2012-04-27 08:51:11 -07:00
parent 2ac635afac
commit ca5cc92277

View File

@@ -2340,7 +2340,6 @@ def check(client_id='', localmanifestpath=None):
global CONDITIONS
munkicommon.getConditions()
CONDITIONS = munkicommon.getConditions()
munkicommon.report['ConditionalItems'] = CONDITIONS
ManagedInstallDir = munkicommon.pref('ManagedInstallDir')
if munkicommon.munkistatusoutput:
@@ -2369,6 +2368,7 @@ def check(client_id='', localmanifestpath=None):
# set up INFO_OBJECT for conditional item comparisons
makePredicateInfoObject()
munkicommon.report['Conditions'] = INFO_OBJECT
munkicommon.display_detail('**Checking for installs**')
processManifestForKey(mainmanifestpath, 'managed_installs',