def _hasPackage(release_packages, releaseName, newpkg):
    """
    Determine if a given package has already been added
    to the packages dictionary for a specified release.
    """
    for pkg in release_packages[releaseName]:
        if (pkg.port == newpkg.port): 
            return True

    return False