weldr: Use GetAllDistroSources in allRepository* functions

This commit is contained in:
Brian C. Lane 2021-05-20 15:36:23 -07:00 committed by Ondřej Budai
parent 76e65e88c8
commit c1da403dc0

View file

@ -3027,7 +3027,7 @@ func (api *API) allRepositoriesByImageType(imageType distro.ImageType) ([]rpmmd.
}
repos := append([]rpmmd.RepoConfig{}, imageTypeRepos...)
for id, source := range api.store.GetAllSourcesByID() {
for id, source := range api.store.GetAllDistroSources(imageType.Arch().Distro().Name()) {
repos = append(repos, source.RepoConfig(id))
}
@ -3042,7 +3042,7 @@ func (api *API) allRepositories(distroName string) ([]rpmmd.RepoConfig, error) {
}
repos := append([]rpmmd.RepoConfig{}, archRepos...)
for id, source := range api.store.GetAllSourcesByID() {
for id, source := range api.store.GetAllDistroSources(distroName) {
repos = append(repos, source.RepoConfig(id))
}