Explorar o código

* cmdline/apt-get.cc:
- applied patch from Frode M. Døving to have APT::Get::HideAutoRemove

Michael Vogt %!s(int64=19) %!d(string=hai) anos
pai
achega
7898bd970a
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 4 3
      cmdline/apt-get.cc
  2. 1 0
      doc/examples/configure-index

+ 4 - 3
cmdline/apt-get.cc

@@ -1394,8 +1394,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
 {
 {
    bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
    bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
    bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
    bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
+   bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");
    pkgDepCache::ActionGroup group(*Cache);
    pkgDepCache::ActionGroup group(*Cache);
-   
 
 
    if(Debug)
    if(Debug)
       std::cout << "DoAutomaticRemove()" << std::endl;
       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;
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
 
 
    // Now see if we destroyed anything
    // Now see if we destroyed anything

+ 1 - 0
doc/examples/configure-index

@@ -33,6 +33,7 @@ APT
   {
   {
      Arch-Only "false";
      Arch-Only "false";
      AutomaticRemove "false";       
      AutomaticRemove "false";       
+     HideAutoRemove "false";
      Download-Only "false";
      Download-Only "false";
      Simulate "false";
      Simulate "false";
      Assume-Yes "false";
      Assume-Yes "false";