def METHOD_NAME(directory):
    """Returns a list of RepoDataQueries constructed from the repodata under
    the directory.
    :param directory: path to a repository directory (parent directory of repodata directory)
    :return: list of RepoDataQueryResult instances
    :raise IOError: if repomd.xml contains no primary location
    """
    path = primaryPath(directory)
    gunzippedPrimary = gzip.GzipFile(path)
    elementTree = ET.parse(gunzippedPrimary)
    root = elementTree.getroot()
    packageQueries = []
    for packageElement in root:
        packageQuery = RepoDataQueryResult(directory, packageElement)
        packageQueries.append(packageQuery)
    return packageQueries