* cmdline/apt-get.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Wed, 14 Mar 2007 12:57:57 +0000 (13:57 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Wed, 14 Mar 2007 12:57:57 +0000 (13:57 +0100)
  - applied patch from Frode M. Døving  to have APT::Get::HideAutoRemove

cmdline/apt-get.cc
doc/examples/configure-index

index ed1ef98be048791a4a084fcfc0cd52792886ba8c..e8e5a8c39f89ed3de2f5de1b3edf6a79d40025bc 100644 (file)
@@ -1394,8 +1394,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
 {
    bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
    bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
+   bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");
    pkgDepCache::ActionGroup group(*Cache);
-   
 
    if(Debug)
       std::cout << "DoAutomaticRemove()" << std::endl;
@@ -1434,8 +1434,9 @@ bool DoAutomaticRemove(CacheFile &Cache)
         }
       }
    }
-   ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
-   if (!doAutoRemove && autoremovelist.size() > 0)
+   if (!hideAutoRemove) 
+      ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
+   if (!doAutoRemove && !hideAutoRemove && autoremovelist.size() > 0)
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
 
    // Now see if we destroyed anything
index 32b7168a0ee8ac6916d3f50eb5946883a45feaf5..d3e061f9a01ee6f38e5ba867c87035c3679c5dab 100644 (file)
@@ -33,6 +33,7 @@ APT
   {
      Arch-Only "false";
      AutomaticRemove "false";       
+     HideAutoRemove "false";
      Download-Only "false";
      Simulate "false";
      Assume-Yes "false";