Returns True if any of the installed versions match the specified version conditions,
    otherwise returns False.

    installed_versions
        The installed versions

    version_conditions_string
        The string containing all version conditions. E.G.
        1.2.3-4
        >=1.2.3-4
        >=1.2.3-4, <2.3.4-5
        >=1.2.3-4, <2.3.4-5, !=1.2.4-1

    ignore_epoch : False
        When a package version contains an non-zero epoch (e.g.
        ``1:3.14.159-2.el7``, and a specific version of a package is desired,
        set this option to ``True`` to ignore the epoch when comparing
        versions.

    allow_updates : False
        Allow the package to be updated outside Salt's control (e.g. auto updates on Windows).
        This means a package on the Minion can have a newer version than the latest available in
        the repository without enforcing a re-installation of the package.
        (Only applicable if only one strict version condition is specified E.G. version: 2.0.6~ubuntu3)

def _fulfills_version_string(installed_versions, version_conditions_string, ignore_epoch=False, allow_updates=False):
    '''
    Returns True if any of the installed versions match the specified version conditions,
    otherwise returns False.

    installed_versions
        The installed versions

    version_conditions_string
        The string containing all version conditions. E.G.
        1.2.3-4
        >=1.2.3-4
        >=1.2.3-4, <2.3.4-5
        >=1.2.3-4, <2.3.4-5, !=1.2.4-1

    ignore_epoch : False
        When a package version contains an non-zero epoch (e.g.
        ``1:3.14.159-2.el7``, and a specific version of a package is desired,
        set this option to ``True`` to ignore the epoch when comparing
        versions.

    allow_updates : False
        Allow the package to be updated outside Salt's control (e.g. auto updates on Windows).
        This means a package on the Minion can have a newer version than the latest available in
        the repository without enforcing a re-installation of the package.
        (Only applicable if only one strict version condition is specified E.G. version: 2.0.6~ubuntu3)
    '''
    version_conditions = _parse_version_string(version_conditions_string)
    for installed_version in installed_versions:
        fullfills_all = True
        for operator, version_string in version_conditions:
            if allow_updates and len(version_conditions) == 1 and operator == '==':
                operator = '>='
            fullfills_all = fullfills_all and _fulfills_version_spec([installed_version], operator, version_string, ignore_epoch=ignore_epoch)
        if fullfills_all:
            return True
    return False