Explorar o código

* fix error in AutocleanInterval, closes: #319339
(thanks to Israel G. Lugo for the patch)
* add "purge" commandline argument, closes: #133421)
(thanks to Julien Danjou for the patch)

Michael Vogt %!s(int64=19) %!d(string=hai) anos
pai
achega
41cd4f9af1
Modificáronse 4 ficheiros con 17 adicións e 2 borrados
  1. 6 1
      cmdline/apt-get.cc
  2. 1 1
      debian/apt.cron.daily
  3. 4 0
      debian/changelog
  4. 6 0
      doc/apt-get.8.xml

+ 6 - 1
cmdline/apt-get.cc

@@ -1569,12 +1569,16 @@ bool DoInstall(CommandLine &CmdL)
    bool DefRemove = false;
    bool DefRemove = false;
    if (strcasecmp(CmdL.FileList[0],"remove") == 0)
    if (strcasecmp(CmdL.FileList[0],"remove") == 0)
       DefRemove = true;
       DefRemove = true;
+   else if (strcasecmp(CmdL.FileList[0], "purge") == 0)
+   {
+      _config->Set("APT::Get::Purge", true);
+      DefRemove = true;
+   }
    else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0)
    else if (strcasecmp(CmdL.FileList[0], "autoremove") == 0)
    {
    {
       _config->Set("APT::Get::AutomaticRemove", "true");
       _config->Set("APT::Get::AutomaticRemove", "true");
       DefRemove = true;
       DefRemove = true;
    }
    }
-
    // new scope for the ActionGroup
    // new scope for the ActionGroup
    {
    {
       pkgDepCache::ActionGroup group(Cache);
       pkgDepCache::ActionGroup group(Cache);
@@ -2620,6 +2624,7 @@ bool ShowHelp(CommandLine &CmdL)
       "   upgrade - Perform an upgrade\n"
       "   upgrade - Perform an upgrade\n"
       "   install - Install new packages (pkg is libc6 not libc6.deb)\n"
       "   install - Install new packages (pkg is libc6 not libc6.deb)\n"
       "   remove - Remove packages\n"
       "   remove - Remove packages\n"
+      "   purge - Remove and purge packages\n"
       "   source - Download source archives\n"
       "   source - Download source archives\n"
       "   build-dep - Configure build-dependencies for source packages\n"
       "   build-dep - Configure build-dependencies for source packages\n"
       "   dist-upgrade - Distribution upgrade, see apt-get(8)\n"
       "   dist-upgrade - Distribution upgrade, see apt-get(8)\n"

+ 1 - 1
debian/apt.cron.daily

@@ -152,7 +152,7 @@ UpdateInterval=0
 DownloadUpgradeableInterval=0
 DownloadUpgradeableInterval=0
 eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists DownloadUpgradeableInterval APT::Periodic::Download-Upgradeable-Packages)
 eval $(apt-config shell UpdateInterval APT::Periodic::Update-Package-Lists DownloadUpgradeableInterval APT::Periodic::Download-Upgradeable-Packages)
 AutocleanInterval=$DownloadUpgradeableInterval
 AutocleanInterval=$DownloadUpgradeableInterval
-eval $(apt-config shell AutocleanInterval APT::Periodic::Autoclean)
+eval $(apt-config shell AutocleanInterval APT::Periodic::AutocleanInterval)
 
 
 UnattendedUpgradeInterval=0
 UnattendedUpgradeInterval=0
 eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade)
 eval $(apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade)

+ 4 - 0
debian/changelog

@@ -21,6 +21,10 @@ apt (0.7.2) unstable; urgency=low
     - added support for lpia
     - added support for lpia
   * configure.in:
   * configure.in:
     - check systemtable for architecture mapping too
     - check systemtable for architecture mapping too
+  * fix error in AutocleanInterval, closes: #319339
+    (thanks to Israel G. Lugo for the patch)
+  * add "purge" commandline argument, closes: #133421)
+    (thanks to Julien Danjou for the patch)
   
   
  -- Michael Vogt <mvo@debian.org>  Wed, 06 Jun 2007 23:19:50 +0200
  -- Michael Vogt <mvo@debian.org>  Wed, 06 Jun 2007 23:19:50 +0200
 
 

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

@@ -42,6 +42,7 @@
          <arg>dselect-upgrade</arg>
          <arg>dselect-upgrade</arg>
          <arg>install <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>install <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>remove <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>remove <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
+         <arg>purge <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>source <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>source <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg>check</arg>
          <arg>check</arg>
@@ -152,6 +153,11 @@
      installed instead of removed.</para></listitem>
      installed instead of removed.</para></listitem>
      </varlistentry>
      </varlistentry>
 
 
+     <varlistentry><term>purge</term>
+     <listitem><para><literal>purge</literal> is identical to <literal>remove</literal> except that packages are 
+     removed and purged.</para></listitem>
+     </varlistentry>
+
      <varlistentry><term>source</term>
      <varlistentry><term>source</term>
      <listitem><para><literal>source</literal> causes <command>apt-get</command> to fetch source packages. APT 
      <listitem><para><literal>source</literal> causes <command>apt-get</command> to fetch source packages. APT 
      will examine the available packages to decide which source package to 
      will examine the available packages to decide which source package to