From 12b0f079a8732381f396141a65d50b09a857377e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Kupec?= Date: Mon, 12 Oct 2009 10:22:33 +0200 Subject: [PATCH] Report unknown repos in 'lr repo ...'. Docs added. --- doc/zypper.8 | 12 +++++++++--- src/repos.cc | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/zypper.8 b/doc/zypper.8 index 0bcee27..3ecc1e5 100644 --- a/doc/zypper.8 +++ b/doc/zypper.8 @@ -906,10 +906,12 @@ Ignore user authentication data in the URI Ignore query string in the URI .TP -.B repos (lr) [options] -List all defined repositories. +.B repos (lr) [options] [repo] ... +List all defined repositories or show detailed information about those +specified as arguments .IP -The following data are printed for each repository found: +If no arguments are given, the following data are printed for each repository +found on the sytem: # (repository number), Enabled (whether the repository is enabled), Refresh (whether auto-refresh is enabled for the repository), Type (rpm-md, yast2, plaindir), Alias (shorthand for Name), and Name. Other columns can be added @@ -921,6 +923,10 @@ change. Keep that in mind when using the numbers with the repository handling commands. On the other hand, using the alias instead of the number is always safe. +To show detailed information about specific repositories, specify them +as arguments, either by alias, number from simple \fBzypper lr\fR, or by +URI; e.g. fB \fBzypper lr factory\fR, or \fBzypper lr 2\fR. + .TP .I \-e, \-\-export This option causes zypper to write repository definition of all defined diff --git a/src/repos.cc b/src/repos.cc index 7af01b7..8ee2264 100644 --- a/src/repos.cc +++ b/src/repos.cc @@ -888,7 +888,10 @@ void list_repos(Zypper & zypper) if (zypper.arguments().empty()) repos.insert(repos.end(), manager.repoBegin(), manager.repoEnd()); else + { get_repos(zypper, zypper.arguments().begin(), zypper.arguments().end(), repos, not_found); + report_unknown_repos(zypper.out(), not_found); + } } catch ( const Exception &e ) { -- 2.7.4