munki / munki

Managed software installation for macOS —

Home Page:https://www.munki.org/munki/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: Application info removed from info object during updatecheck and breaks conditions that require said info

tylergunderson opened this issue · comments

Based on our Slack findings this afternoon:

Culprit is here

        # record info object for conditional item comparisons
        reports.report['Conditions'] = info.predicate_info_object()
        # remove application data, because that's recorded elsewhere,
        # and it's generally a _lot_ of data
        if 'applications' in reports.report['Conditions']:
            del reports.report['Conditions']['applications']

Tested with this change:

        # record info object for conditional item comparisons
        reports.report['Conditions'] = {}
        # copy everything except applications data
        for key, value in info.predicate_info_object().items():
            if key != 'applications':
                reports.report['Conditions'][key] = value

Will be addressed in Munki 6.5.1, which should be released today.