From 2964f000de829d350a04f194d321e9a18294a94e Mon Sep 17 00:00:00 2001 From: Patrik Segedy Date: Wed, 12 Jun 2024 11:40:14 +0200 Subject: [PATCH] RHINENG-10440: use repository paths of enabled repos --- listener/upload.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/listener/upload.go b/listener/upload.go index 8c888a05a..a04d7ea95 100644 --- a/listener/upload.go +++ b/listener/upload.go @@ -601,14 +601,13 @@ func processRepos(systemProfile *inventory.SystemProfile) ([]string, []string) { if r.Enabled { repos = append(repos, rID) - } - - repoPath, err := getRepoPath(systemProfile, &r) - if err != nil { - utils.LogWarn("repo", rID, "mirrorlist", r.Mirrorlist, "base_url", r.BaseURL, "invalid repository_path") - } - if len(repoPath) > 0 { - repoPaths = append(repoPaths, repoPath) + repoPath, err := getRepoPath(systemProfile, &r) + if err != nil { + utils.LogWarn("repo", rID, "mirrorlist", r.Mirrorlist, "base_url", r.BaseURL, "invalid repository_path") + } + if len(repoPath) > 0 { + repoPaths = append(repoPaths, repoPath) + } } } fixEpelRepos(systemProfile, repos)