]> 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 1cd5080cc44214504a3d46fb3c7036e778a977e7..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;
@@ -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)
@@ -1739,7 +1743,7 @@ int main(int argc,const char *argv[])                                     /*{{{*/
       {'c',"config-file",0,CommandLine::ConfigFile},
       {'o',"option",0,CommandLine::ArbItem},
       {0,"installed","APT::Cache::Installed",0},
-      {0,"pre-depends","APT::Cache::ShowPreDepends",0},
+      {0,"pre-depends","APT::Cache::ShowPre-Depends",0},
       {0,"depends","APT::Cache::ShowDepends",0},
       {0,"recommends","APT::Cache::ShowRecommends",0},
       {0,"suggests","APT::Cache::ShowSuggests",0},