[Yum-devel] [PATCH] Show the "first" baseurl in repolist -v (and the number of other urls).

James Antill james at and.org
Fri Jan 21 16:25:40 UTC 2011


---
 yumcommands.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/yumcommands.py b/yumcommands.py
index ecce347..45cd209 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -972,6 +972,12 @@ class RepoListCommand(YumCommand):
                     elif repo.mirrorlist:
                         out += [base.fmtKeyValFill(_("Repo-mirrors : "),
                                                    repo.mirrorlist)]
+                    if enabled and repo.urls:
+                        url = repo.urls[0]
+                        if len(repo.urls) > 1:
+                            url += ' (%d more)' % (len(repo.urls) - 1)
+                        out += [base.fmtKeyValFill(_("Repo-baseurl : "),
+                                                   url)]
 
                     if not os.path.exists(repo.metadata_cookie):
                         last = _("Unknown")
-- 
1.7.3.4



More information about the Yum-devel mailing list