Add rebuild_repo_metadata method