]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
merge patches from daniel to fix merge artifact and test failure
[apt.git] / cmdline / apt-cache.cc
index ce869581b47d3228fdb09ba87b4507ce09565adb..0a2c28d2389309b8cbeefa254a1b1acbd7c99da6 100644 (file)
@@ -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;