[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/yumRepo.py yumcommands.py

James Antill james at osuosl.org
Tue Oct 21 16:21:57 UTC 2008


 yum/yumRepo.py |    4 ++++
 yumcommands.py |   13 ++++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 42d71353951a7b847d9631ab7fbc5646d79fadfc
Author: James Antill <james at and.org>
Date:   Tue Oct 21 12:16:01 2008 -0400

    Add metalink to repolist -v

diff --git a/yumcommands.py b/yumcommands.py
index 47d4b0e..916feb0 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -778,7 +778,10 @@ class RepoListCommand(YumCommand):
                         out += [base.fmtKeyValFill(_("Repo-baseurl: "),
                                                    ", ".join(baseurls))]
 
-                    if repo.mirrorlist:
+                    if repo.metalink:
+                        out += [base.fmtKeyValFill(_("Repo-metalink: "),
+                                                   repo.metalink)]
+                    elif repo.mirrorlist:
                         out += [base.fmtKeyValFill(_("Repo-mirrors: "),
                                                    repo.mirrorlist)]
 
commit 15ee98b2d55e6638f063411834185f5ba53c2e33
Author: James Antill <james at and.org>
Date:   Tue Oct 21 12:15:33 2008 -0400

    Fix baseurl output in repolist -v, when we've got a new mirrorlist/metalink

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 795febf..d9d1ae6 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -532,6 +532,10 @@ class YumRepository(Repository, config.RepoConf):
            with valid ones, run  self.check() at the end to make sure it worked"""
 
         self.baseurl = self._replace_and_check_url(self.baseurl)
+        # FIXME: We put all the mirrors in .baseurl as well as
+        # .urls for backward compat. (see bottom of func). So we'll save this
+        # out for repolist -v ... or anything else wants to know the baseurl
+        self._orig_baseurl = self.baseurl
 
         mirrorurls = []
         if self.metalink and not self.mirrorlistparsed:
diff --git a/yumcommands.py b/yumcommands.py
index 8f25623..47d4b0e 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -770,9 +770,13 @@ class RepoListCommand(YumCommand):
                                 base.fmtKeyValFill(_("Repo-pkgs   : "), ui_num),
                                 base.fmtKeyValFill(_("Repo-size   : "),ui_size)]
 
-                    if repo.baseurl:
+                    if hasattr(repo, '_orig_baseurl'):
+                        baseurls = repo._orig_baseurl
+                    else:
+                        baseurls = repo.baseurl
+                    if baseurls:
                         out += [base.fmtKeyValFill(_("Repo-baseurl: "),
-                                                   ", ".join(repo.baseurl))]
+                                                   ", ".join(baseurls))]
 
                     if repo.mirrorlist:
                         out += [base.fmtKeyValFill(_("Repo-mirrors: "),


More information about the Yum-commits mailing list