Add support for flat repositories