def _check_newer_major(current_highest, versions):
    """
    Utility function for checking whether a new version exists and is not going
    to be updated. This is undesirable because it could result in new versions
    existing and not being updated. Raising is prefering to adding the new
    version manually because that allows maintainers to check whether the new
    version works.
    @param current_highest: as returned by VersionsFile.highest_version_major()
    @param versions: a list of versions.
    @return: void
    @raise MissingMajorException: A new version from a newer major branch is
        exists, but will not be downloaded due to it not being in majors.
    """
    for tag in versions:
        update_majors = list(current_highest.keys())
        example_version_str = current_highest[update_majors[0]]
        if _tag_is_rubbish(tag, example_version_str):
            continue

        major = tag[0:len(update_majors[0])]
        if major not in current_highest:
            higher_version_present = False
            for major_highest in current_highest:
                if version_gt(major_highest, major):
                    higher_version_present = True
                    break

            if not higher_version_present:
                msg = 'Failed updating: Major %s has a new version and is not going to be updated.' % major
                raise MissingMajorException(msg)
Utility function for checking whether a new version exists and is not going
    to be updated. This is undesirable because it could result in new versions
    existing and not being updated. Raising is prefering to adding the new
    version manually because that allows maintainers to check whether the new
    version works.
    @param current_highest: as returned by VersionsFile.highest_version_major()
    @param versions: a list of versions.
    @return: void
    @raise MissingMajorException: A new version from a newer major branch is
        exists, but will not be downloaded due to it not being in majors.