the benefit no matter which objects they are using. If we have a mediaid and no mediafunc and no other urls to use - then mark the repo as 'skip_if_unavailable' and 'disabled' Then if we get any repo obj back from repo.setup() as not enabled then mark it as disabled in the repos object - this is mostly so our plugins don't accidentally trample all over it. --- yum/repos.py | 6 +++++- yum/yumRepo.py | 1 + 2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/yum/repos.py b/yum/repos.py index 7e9c417..4b74ac6 100644 --- a/yum/repos.py +++ b/yum/repos.py @@ -78,7 +78,11 @@ class RepoStorage: for repo in repos: repo.setup(self.ayum.conf.cache, self.ayum.mediagrabber, gpg_import_func = self.gpg_import_func, confirm_func=self.confirm_func) - + # if we come back from setup NOT enabled then mark as disabled + # so nothing else touches us + if not repo.enabled: + self.disableRepo(repo.id) + self._setup = True self.ayum.plugins.run('postreposetup') diff --git a/yum/yumRepo.py b/yum/yumRepo.py index ac6c7c0..dd595f0 100644 --- a/yum/yumRepo.py +++ b/yum/yumRepo.py @@ -955,6 +955,7 @@ class YumRepository(Repository, config.RepoConf): if not self.mediafunc and self.mediaid and not self.mirrorlist and not self.baseurl: verbose_logger.log(logginglevels.DEBUG_2, "Disabling media repo for non-media-aware frontend") self.enabled = False + self.skip_if_unavailable = True def _cachingRepoXML(self, local): """ Should we cache the current repomd.xml """ -- 1.7.1.1 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel