Procházet zdrojové kódy

* merged from the apt--auto-mark branch

Michael Vogt před 19 roky
rodič
revize
a8d4b8ff68
2 změnil soubory, kde provedl 14 přidání a 2 odebrání
  1. 1 2
      cmdline/apt-get.cc
  2. 13 0
      doc/apt-get.8.xml

+ 1 - 2
cmdline/apt-get.cc

@@ -1409,7 +1409,7 @@ bool DoUpdate(CommandLine &CmdL)
 bool DoAutomaticRemove(CacheFile &Cache)
 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");
+   bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
    pkgDepCache::ActionGroup group(*Cache);
    pkgDepCache::ActionGroup group(*Cache);
    
    
 
 
@@ -2621,7 +2621,6 @@ void GetInitialize()
    _config->Set("APT::Get::Fix-Broken",false);
    _config->Set("APT::Get::Fix-Broken",false);
    _config->Set("APT::Get::Force-Yes",false);
    _config->Set("APT::Get::Force-Yes",false);
    _config->Set("APT::Get::List-Cleanup",true);
    _config->Set("APT::Get::List-Cleanup",true);
-   _config->Set("APT::Get::AutomaticRemove",false);
 }
 }
 									/*}}}*/
 									/*}}}*/
 // SigWinch - Window size change signal handler				/*{{{*/
 // SigWinch - Window size change signal handler				/*{{{*/

+ 13 - 0
doc/apt-get.8.xml

@@ -47,6 +47,7 @@
          <arg>check</arg>
          <arg>check</arg>
          <arg>clean</arg>
          <arg>clean</arg>
          <arg>autoclean</arg>
          <arg>autoclean</arg>
+         <arg>autoremove</arg>
       </group>   
       </group>   
    </cmdsynopsis>
    </cmdsynopsis>
  </refsynopsisdiv>
  </refsynopsisdiv>
@@ -203,6 +204,11 @@
      <literal>APT::Clean-Installed</literal> will prevent installed packages from being
      <literal>APT::Clean-Installed</literal> will prevent installed packages from being
      erased if it is set to off.</para></listitem>
      erased if it is set to off.</para></listitem>
      </varlistentry>
      </varlistentry>
+
+     <varlistentry><term>autoremove</term>
+     <listitem><para><literal>autoremove</literal> is used to remove packages that were automatically
+     installed to satisfy dependencies for some package and that are no more needed.</para></listitem>
+     </varlistentry>
    </variablelist>
    </variablelist>
  </refsect1>
  </refsect1>
  
  
@@ -382,6 +388,13 @@
      Configuration Item: <literal>APT::Get::Remove</literal>.</para></listitem>
      Configuration Item: <literal>APT::Get::Remove</literal>.</para></listitem>
      </varlistentry>
      </varlistentry>
 
 
+     <varlistentry><term><option>--auto-remove</option></term>
+     <listitem><para>If the command is either <literal>install</literal> or <literal>remove</literal>,
+     then this option acts like running <literal>autoremove</literal> command, removing the unused
+     dependency packages. Configuration Item: <literal>APT::Get::AutomaticRemove</literal>.
+     </para></listitem>
+     </varlistentry>
+
      <varlistentry><term><option>--only-source</option></term>
      <varlistentry><term><option>--only-source</option></term>
      <listitem><para>Only has meaning for the
      <listitem><para>Only has meaning for the
      <literal>source</literal> and <literal>build-dep</literal>
      <literal>source</literal> and <literal>build-dep</literal>