[PATCH 2/2] Don't disable anaconda repo on rawhide

Brian C. Lane bcl at redhat.com
Mon Mar 10 23:30:30 UTC 2014


The anaconda (BASE_REPO_NAME) repo will be added when the user enters a
repo url manually. Use it instead of the default rawhide mirror repo.
But both it and the rawhide repo were being disabled (rawhide disabled
anaconda, and anaconda with method disabled rawhide).

Also add some better logging to describe what repos are being used.
---
 pyanaconda/packaging/yumpayload.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index b864f12..6f61878 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -512,6 +512,7 @@ reposdir=%s
                     self.disableRepo(repo.id)
             return
 
+
         # see if we can get a usable base repo from self.data.method
         if method.method:
             try:
@@ -587,6 +588,7 @@ reposdir=%s
                 elif self._yum.conf.yumvar['releasever'] == "rawhide" and \
                      "rawhide" in self.repos and \
                      self._yum.repos.getRepo("rawhide").enabled and \
+                     repo.id != BASE_REPO_NAME and \
                      repo.id != "rawhide":
                     self.disableRepo(repo.id)
                 elif method.method and \
@@ -604,11 +606,14 @@ reposdir=%s
                 repo = self._yum.repos.getRepo(repo_id)
                 if repo.enabled:
                     try:
+                        log.info("gathering repo metadata for %s", repo_id)
                         self._getRepoMetadata(repo)
                     except PayloadError as e:
                         log.error("failed to grab repo metadata for %s: %s",
                                   repo_id, e)
                         self.disableRepo(repo_id)
+                else:
+                    log.info("skipping disabled repo %s", repo_id)
 
         # Make sure environmentAddon information is current
         self._refreshEnvironmentAddons()
-- 
1.8.5.3



More information about the anaconda-patches mailing list