]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
fix various -Wall warnings
[apt.git] / cmdline / apt-cache.cc
index d73111b6a505b89f16ad41b2ca143e57ffe20b05..b16a0e5d0f8a6780207e6daa9b7c85e9f1031d58 100644 (file)
@@ -555,6 +555,7 @@ bool Depends(CommandLine &CmdL)
    
    bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
    bool Installed = _config->FindB("APT::Cache::Installed",false);
+   bool Important = _config->FindB("APT::Cache::Important",false);
    bool DidSomething;
    do
    {
@@ -577,7 +578,12 @@ bool Depends(CommandLine &CmdL)
         
         for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
         {
-
+           // Important deps only
+           if (Important == true)
+              if (D->Type != pkgCache::Dep::PreDepends &&
+                  D->Type != pkgCache::Dep::Depends)
+                 continue;
+                 
            pkgCache::PkgIterator Trg = D.TargetPkg();
 
            if((Installed && Trg->CurrentVer != 0) || !Installed)
@@ -1270,7 +1276,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
                                                                        /*}}}*/
 // Search - Perform a search                                           /*{{{*/
 // ---------------------------------------------------------------------
-/* This searches the package names and pacakge descriptions for a pattern */
+/* This searches the package names and package descriptions for a pattern */
 struct ExDescFile
 {
    pkgCache::DescFile *Df;