From fcced4bdf71eecb190b4dddaaa209632125d179b Mon Sep 17 00:00:00 2001 From: Dominik Heidler Date: Thu, 23 Dec 2010 14:46:12 +0100 Subject: [PATCH] view mirrorlist-url when there is no baseurl set (in the repo-file) --- src/repos.cc | 8 ++++---- zypper.spec.cmake | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/repos.cc b/src/repos.cc index 2300591..1dcbf05 100644 --- a/src/repos.cc +++ b/src/repos.cc @@ -806,7 +806,7 @@ static void print_rug_sources_list(const std::list &repos) // name tr << repo.name(); // url - tr << (repo.baseUrlsEmpty() ? "n/a" : repo.url().asString()); + tr << (repo.baseUrlSet() ? repo.url().asString() : (repo.mirrorListUrl().asString().empty() ? "n/a" : repo.mirrorListUrl().asString() )); tbl << tr; i++; @@ -958,7 +958,7 @@ static void print_repo_list(Zypper & zypper, * \todo properly handle multiple baseurls - show "(multiple)" */ if (all || showuri) - tr << (repo.baseUrlsEmpty() ? "n/a" : repo.url().asString()); + tr << (repo.baseUrlSet() ? repo.url().asString() : (repo.mirrorListUrl().asString().empty() ? "n/a" : repo.mirrorListUrl().asString() )); if (all || showservice) tr << repo.service(); @@ -996,7 +996,7 @@ static void print_repo_details(Zypper & zypper, list & repos) TableRow tr; tr << _("Alias") << repo.alias(); t << tr; TableRow tr_name; tr_name << _("Name") << repo.name(); t << tr_name; - TableRow tr_uri; tr_uri << _("URI") << repo.url().asString(); t << tr_uri; + TableRow tr_uri; tr_uri << _("URI") << (repo.baseUrlSet() ? repo.url().asString() : (repo.mirrorListUrl().asString().empty() ? "n/a" : repo.mirrorListUrl().asString() )); t << tr_uri; TableRow tr_en; tr_en << _("Enabled") << (repo.enabled() ? _("Yes") : _("No")); t << tr_en; @@ -1620,7 +1620,7 @@ void add_repo(Zypper & zypper, RepoInfo & repo) s << ( repo.enabled() ? "[x]" : "[ ]" ); s << ( repo.autorefresh() ? "* " : " " ); s << (zypper.config().show_alias ? repo.alias() : repo.name()); - s << " (" << (repo.baseUrlsEmpty() ? "n/a" : repo.url().asString()) << ")" << endl; + s << " (" << (repo.baseUrlSet() ? repo.url().asString() : (repo.mirrorListUrl().asString().empty() ? "n/a" : repo.mirrorListUrl().asString() )) << ")" << endl; } else { diff --git a/zypper.spec.cmake b/zypper.spec.cmake index c1cd609..b54597c 100644 --- a/zypper.spec.cmake +++ b/zypper.spec.cmake @@ -11,7 +11,7 @@ # norootforbuild Name: @PACKAGE@ -BuildRequires: libzypp-devel >= 8.0.1 +BuildRequires: libzypp-devel >= 8.11.0 BuildRequires: boost-devel >= 1.33.1 BuildRequires: gettext-devel >= 0.15 BuildRequires: readline-devel >= 5.1 -- 2.7.4