def METHOD_NAME(self, ref, packages):
    platforms = set([x.platform for x in packages])
    if len(platforms) != 1:
        raise ValueError("Cannot mix packages of different platforms in the same invocation: {0}".format(list(platforms)))
    archs = set([x.arch for x in packages])
    archs.remove(None)
    if len(archs) != 1:
        raise ValueError("Cannot mix packages of different architectures in the same invocation: {0}".format(list(archs)))
    tag = is_tag(ref)
    base = "{0}/{1}".format(self.base, ref)
    if tag: base = "{0}/tag".format(self.base)
    base += "/" + list(platforms)[0]
    reposToCreate = set()
    for package in packages:
        repo = "{0}/{1}".format(base, list(archs)[0])
        if package.type == PackageType.Source:
            repo = "{0}/SRPMS".format(base)
        copy_to_repo(package.path, repo)
        reposToCreate.add(repo)
    for repo in reposToCreate:
        createrepo(repo)