summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 94654ffd4..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;
@@ -1676,7 +1680,7 @@ bool GenCaches(CommandLine &Cmd)
/* */
bool ShowHelp(CommandLine &Cmd)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+ ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
COMMON_ARCH,__DATE__,__TIME__);
if (_config->FindB("version") == true)