createrepo function