def processOptionalInstall(manifestitem, cataloglist, installinfo):
    manifestitemname = os.path.split(manifestitem)[1]
    munkicommon.display_debug1(
        "* Processing manifest item %s for optional install" %
        manifestitemname)

    # have we already processed this?
    if manifestitemname in installinfo['optional_installs']:
        munkicommon.display_debug1(
            '%s has already been processed for optional install.',
            manifestitemname)
        return
    elif manifestitemname in installinfo['processed_installs']:
        munkicommon.display_debug1(
            '%s has already been processed for install.', manifestitemname)
        return
    elif manifestitemname in installinfo['processed_uninstalls']:
        munkicommon.display_debug1(
            '%s has already been processed for uninstall.', manifestitemname)
        return

    # check to see if item (any version) is already in the
    # optional_install list:
    for item in installinfo['optional_installs']:
        if manifestitemname == item['name']:
            munkicommon.display_debug1(
                '%s has already been processed for optional install.',
                manifestitemname)
            return

    item_pl = getItemDetail(manifestitem, cataloglist)
    if not item_pl:
        munkicommon.display_warning(
            'Could not process item %s for optional install. '
            'No pkginfo found in catalogs: %s ',
            manifestitem, ', '.join(cataloglist))
        return

    # if we get to this point we can add this item
    # to the list of optional installs
    iteminfo = {}
    iteminfo['name'] = item_pl.get('name', manifestitemname)
    iteminfo['description'] = item_pl.get('description', '')
    iteminfo['version_to_install'] = item_pl.get('version', 'UNKNOWN')
    iteminfo['display_name'] = item_pl.get('display_name', '')
    for key in ['category', 'developer', 'icon_name', 'icon_hash',
                'requires', 'RestartAction']:
        if key in item_pl:
            iteminfo[key] = item_pl[key]
    iteminfo['installed'] = someVersionInstalled(item_pl)
    if iteminfo['installed']:
        iteminfo['needs_update'] = (installedState(item_pl) == 0)
    iteminfo['licensed_seat_info_available'] = item_pl.get(
        'licensed_seat_info_available', False)
    iteminfo['uninstallable'] = (
        item_pl.get('uninstallable', False)
        and (item_pl.get('uninstall_method', '') != ''))
    iteminfo['installer_item_size'] = \
        item_pl.get('installer_item_size', 0)
    iteminfo['installed_size'] = item_pl.get(
        'installer_item_size', iteminfo['installer_item_size'])
    if (not iteminfo['installed']) or (iteminfo.get('needs_update')):
        if not enoughDiskSpace(item_pl,
                               installinfo.get('managed_installs', []),
                               warn=False):
            iteminfo['note'] = (
                'Insufficient disk space to download and install.')
    optional_keys = ['preinstall_alert',
                     'preuninstall_alert',
                     'preupgrade_alert',
                     'OnDemand']
    for key in optional_keys:
        if key in item_pl:
            iteminfo[key] = item_pl[key]

    munkicommon.display_debug1(
        'Adding %s to the optional install list', iteminfo['name'])
    installinfo['optional_installs'].append(iteminfo)
Saves the light's properties back to :attr:`xmlnode`
dataset/ETHPy150Open munki/munki/code/client/munkilib/updatecheck.py/processOptionalInstall--crossover with--dataset/ETHPy150Open pycollada/pycollada/collada/light.py/PointLight.save