瀏覽代碼

Add a option to apt-cache policy to additionally init the DepCache before
starting to get the package informations.
This is useful e.g. for debugging the MultiArchKiller.

David Kalnischkies 16 年之前
父節點
當前提交
0588779fb2
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      cmdline/apt-cache.cc

+ 6 - 0
cmdline/apt-cache.cc

@@ -1555,6 +1555,12 @@ bool Policy(CommandLine &CmdL)
    if (unlikely(Cache == NULL || Plcy == NULL || SrcList == NULL))
       return false;
 
+   /* Should the MultiArchKiller be run to see which pseudo packages for an
+      arch all package are currently installed? Activating it gives a speed
+      penality for no real gain beside enhanced debugging, so in general no. */
+   if (_config->FindB("APT::Cache::Policy::DepCache", false) == true)
+      CacheFile.GetDepCache();
+
    // Print out all of the package files
    if (CmdL.FileList[1] == 0)
    {