summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-09-28 14:50:38 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-09-28 14:50:38 +0200
commit24fd9c0645b34ebb433588582d4e593cfcc5427a (patch)
treee91550ddf8b6791a8ea98fba57874f2e0d5a11b4 /cmdline
parent6fdb6892cbc333b6be5ff6a3cc55879a17f78430 (diff)
parent173c98da4cfa28ccde70c4d503fcdf6230b9085f (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index ce869581b..0a2c28d23 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -597,6 +597,7 @@ bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
bool const Installed = _config->FindB("APT::Cache::Installed", false);
bool const Important = _config->FindB("APT::Cache::Important", false);
bool const ShowDepType = _config->FindB("APT::Cache::ShowDependencyType", RevDepends == false);
+ bool const ShowVersion = _config->FindB("APT::Cache::ShowVersion", false);
bool const ShowPreDepends = _config->FindB("APT::Cache::ShowPre-Depends", true);
bool const ShowDepends = _config->FindB("APT::Cache::ShowDepends", true);
bool const ShowRecommends = _config->FindB("APT::Cache::ShowRecommends", Important == false);
@@ -646,10 +647,13 @@ bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
if (ShowDepType == true)
cout << D.DepType() << ": ";
if (Trg->VersionList == 0)
- cout << "<" << Trg.FullName(true) << ">" << endl;
+ cout << "<" << Trg.FullName(true) << ">";
else
- cout << Trg.FullName(true) << endl;
-
+ cout << Trg.FullName(true);
+ if (ShowVersion == true && D->Version != 0)
+ cout << " (" << pkgCache::CompTypeDeb(D->CompareOp) << ' ' << D.TargetVer() << ')';
+ cout << std::endl;
+
if (Recurse == true && Shown[Trg->ID] == false)
{
Shown[Trg->ID] = true;