On Thu, 2011-09-29 at 11:32 +0200, Zdeněk Pavlas wrote: > Set up metalink earlier, to avoid calling _hack_mirrorlist_for_anaconda() > at four different places. > --- > yum/__init__.py | 9 +++++++++ > yum/yumRepo.py | 19 ------------------- > 2 files changed, 9 insertions(+), 19 deletions(-) > > diff --git a/yum/__init__.py b/yum/__init__.py > index 5fb7c00..45130e9 100644 > --- a/yum/__init__.py > +++ b/yum/__init__.py > @@ -539,6 +539,15 @@ class YumBase(depsolve.Depsolve): > repo.yumvar.update(self.conf.yumvar) > repo.cfg = parser > > + # Anaconda doesn't like having mirrorlist and metalink, so we allow > + # mirrorlist to act like metalink. Except we'd really like to know > which > + # we have without parsing it ... and want to store it in the right > + # place etc. > + # So here is #1 hack: see if the metalink is unset and the > mirrorlist > + # URL contains the string "metalink", if it does we copy it over. > + if not repo.metalink and 'metalink' in (repo.mirrorlist or ''): > + repo.metalink = repo.mirrorlist > + > return repo
NAK. This is in readRepoConfig() ... and anaconda overrides that function. I'm also pretty sure that we can't assume that mirrorlist is set here anyway. _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel